"Fossies" - the Fresh Open Source Software Archive

Member "ILIAS-5.4.9/libs/composer/vendor/pimple/pimple/ext/pimple/tests/015.phpt" (24 Jan 2020, 266 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 protect()
    3 --SKIPIF--
    4 <?php if (!extension_loaded("pimple")) print "skip"; ?>
    5 --FILE--
    6 <?php
    7 
    8 $p = new Pimple\Container();
    9 $f = function () { return 'foo'; };
   10 $p['foo'] = $f;
   11 
   12 $p->protect($f);
   13 
   14 var_dump($p['foo']);
   15 --EXPECTF--
   16 object(Closure)#%i (0) {
   17 }