1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/spl/tests/ArrayObject/asort_disabled.phpt
2025-07-03 21:50:45 +01:00

19 lines
400 B
PHP

--TEST--
ArrayObject when function asort() is disabled
--INI--
disable_functions=asort
--FILE--
<?php
$a = ['hello', 'world', 'SPL', 'is', 'fun', '!'];
$ao = new ArrayObject($a);
$ao->asort();
var_dump($ao);
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot call method asort when function asort is disabled in %s:%d
Stack trace:
#0 %s(%d): ArrayObject->asort()
#1 {main}
thrown in %s on line %d