Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 74f4b772aa
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (22 sloc) 0.542 kb
--TEST--
runkit_constant_remove() function removes constant from class
--SKIPIF--
<?php
if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(array_shift(explode('.', PHP_VERSION)) < 5) print "skip";
?>
--FILE--
<?php
class TestClass {
const FOO = 'foo';
}
$const = 'TestClass::FOO';
var_dump($const);
runkit_constant_remove($const);
var_dump($const);
var_dump(TestClass::FOO);
?>
--EXPECTF--
string(14) "TestClass::FOO"
string(14) "TestClass::FOO"
Fatal error: Undefined class constant 'FOO' in %s on line %d
Jump to Line
Something went wrong with that request. Please try again.