Skip to content
This repository
tree: 74f4b772aa
Fetching contributors…

Cannot retrieve contributors at this time

file 15 lines (15 sloc) 0.533 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
--TEST--
Runkit_Sandbox::__call_user_func() method with closure as the first parameter
--SKIPIF--
<?php if(!extension_loaded("runkit") || !RUNKIT_FEATURE_SANDBOX) print "skip";
      /* May not be available due to lack of TSRM interpreter support */
      if(!function_exists("runkit_lint")) print "skip";
      if(version_compare(PHP_VERSION, '5.3.0', '<')) print "skip";
?>
--FILE--
<?php
$php = new Runkit_Sandbox();
$php->a = "OK\n";
$php->call_user_func(function() { global $a; print $a; }); /* As of PHP 5.3.0 */
--EXPECT--
OK
Something went wrong with that request. Please try again.