PHP Classes

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

Recommend this page to a friend!
  Classes of uche   Farm Price   vendor/pimple/pimple/ext/pimple/tests/004.phpt   Download  
File: vendor/pimple/pimple/ext/pimple/tests/004.phpt
Role: Example script
Content type: text/plain
Description: Example script
Class: Farm Price
API to get the prices from agriculture markets
Author: By
Last change:
Date: 2 years ago
Size: 545 bytes
 

Contents

Class file image Download
--TEST--
Test has/unset dim handlers
--SKIPIF--
<?php if (!extension_loaded("pimple")) print "skip"; ?>
--FILE--
<?php
$p
= new Pimple\Container();
$p[] = 42;
var_dump($p[0]);
unset(
$p[0]);
var_dump($p[0]);
$p['foo'] = 'bar';
var_dump(isset($p['foo']));
unset(
$p['foo']);
try {
   
var_dump($p['foo']);
    echo
"Excpected exception";
} catch (
InvalidArgumentException $e) { }
var_dump(isset($p['bar']));
$p['bar'] = NULL;
var_dump(isset($p['bar']));
var_dump(empty($p['bar']));
?>
--EXPECT--
int(42)
NULL
bool(true)
bool(false)
bool(true)
bool(true)