PHP Classes

File: test/85_array_last.php

Recommend this page to a friend!
  Classes of ASCOOS CMS   PHP 8 Backwards Compatibility Library   test/85_array_last.php   Download  
File: test/85_array_last.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP 8 Backwards Compatibility Library
Functions of PHP 8 that work in older PHP versions
Author: By
Last change:
Date: 21 days ago
Size: 253 bytes
 

Contents

Class file image Download
<?php

array_last
([1, 2, 3]); // 3
array_last([2, 3]); // 3
array_last(['a' => 2, 'b' => 1]); // 1
array_last([2, 3, null]); // null
array_last([]); // null
array_last([2, 3, $obj]); // $obj
array_last([1]); // 1
array_last([true]); // true
?>