mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
fef879a2d6
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".
This a followup to ce1d69a1f6, which
implements the same change for integer->int.
30 lines
796 B
PHP
30 lines
796 B
PHP
--TEST--
|
|
Phar: Phar::running()
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
|
--INI--
|
|
phar.readonly=0
|
|
--FILE--
|
|
<?php
|
|
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
|
$pname = 'phar://' . $fname;
|
|
|
|
$phar = new Phar($fname);
|
|
$phar['index.php'] = '<?php
|
|
Phar::running(array());
|
|
var_dump(Phar::running());
|
|
var_dump(Phar::running(false));
|
|
?>';
|
|
include $pname . '/index.php';
|
|
var_dump(Phar::running());
|
|
?>
|
|
===DONE===
|
|
--CLEAN--
|
|
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
|
|
--EXPECTF--
|
|
Warning: Phar::running() expects parameter 1 to be bool, array given in phar://%sphar_running.phar.php/index.php on line 2
|
|
string(%d) "phar://%sphar_running.phar.php"
|
|
string(%d) "%sphar_running.phar.php"
|
|
string(0) ""
|
|
===DONE===
|