"Fossies" - the Fresh Open Source Software Archive

Member "ILIAS-5.4.9/libs/composer/vendor/pimple/pimple/ext/pimple/tests/009.phpt" (24 Jan 2020, 337 Bytes) of package /linux/www/ILIAS-5.4.9.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 --TEST--
    2 Test service is called as callback, and only once
    3 --SKIPIF--
    4 <?php if (!extension_loaded("pimple")) print "skip"; ?>
    5 --FILE--
    6 <?php 
    7 $p = new Pimple\Container();
    8 $p['foo'] = function($arg) use ($p) { var_dump($p === $arg); };
    9 $a = $p['foo'];
   10 $b = $p['foo']; /* should return not calling the callback */
   11 ?>
   12 --EXPECTF--
   13 bool(true)