PHP Classes

File: vendor/pimple/pimple/ext/pimple/tests/008.phpt

Recommend this page to a friend!
  Classes of Gavin Gordon Markowski  >  Helphp PHP Class Generator  >  vendor/pimple/pimple/ext/pimple/tests/008.phpt  >  Download  
File: vendor/pimple/pimple/ext/pimple/tests/008.phpt
Role: Example script
Content type: text/plain
Description: Example script
Class: Helphp PHP Class Generator
Generate classes from configuration parameters
Author: By
Last change:
Date: 4 months ago
Size: 501 bytes
 

Contents

Class file image Download
--TEST--
Test frozen services
--SKIPIF--
<?php if (!extension_loaded("pimple")) print "skip"; ?>
--FILE--
<?php
$p
= new Pimple\Container();
$p[42] = 'foo';
$p[42] = 'bar';

$p['foo'] = function () { };
$p['foo'] = function () { };

$a = $p['foo'];

try {
   
$p['foo'] = function () { };
    echo
"Exception excpected";
} catch (
RuntimeException $e) { }

$p[42] = function() { };
$a = $p[42];

try {
   
$p[42] = function () { };
    echo
"Exception excpected";
} catch (
RuntimeException $e) { }
?>
--EXPECTF--

For more information send a message to info at phpclasses dot org.