Skip to content
Permalink
Browse files

zend_pass is not used here in PHP 7.4, so split tests

  • Loading branch information...
derickr committed May 27, 2019
1 parent 9cf1237 commit 3b85308b70ddada71dd78698c813855d49825de9
Showing with 70 additions and 2 deletions.
  1. +8 −2 tests/bug00728-php71.phpt
  2. +62 −0 tests/bug00728-php74.phpt
@@ -1,7 +1,13 @@
--TEST--
Test for bug #728: Profiler reports __call() invocations confusingly/wrongly. (>= PHP 7.1)
Test for bug #728: Profiler reports __call() invocations confusingly/wrongly. (>= PHP 7.1, < PHP 7.4)
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.1", '>=')) echo "skip >= PHP 7.1 needed\n"; ?>
<?php
require 'tests/utils.inc';
if ( ! ( runtime_version('7.1', '>=') && runtime_version('7.4', '<') ) ) {
echo "skip >= PHP 7.1 && < PHP 7.4 needed\n";
}
?>
--INI--
xdebug.profiler_enable=1
--FILE--
@@ -0,0 +1,62 @@
--TEST--
Test for bug #728: Profiler reports __call() invocations confusingly/wrongly. (>= PHP 7.4)
--SKIPIF--
<?php
require 'tests/utils.inc';
if ( ! ( runtime_version('7.4', '>=') ) ) {
echo "skip >= PHP 7.4 needed\n";
}
?>
--INI--
xdebug.profiler_enable=1
--FILE--
<?php
class bankaccount
{
function __call( $foo, $bar )
{
var_dump( $foo, $bar );
}
}
$b = new bankaccount;
$b->bar();
echo file_get_contents(xdebug_get_profiler_filename());
?>
--EXPECTF--
string(3) "bar"
array(0) {
}
version: 1
creator: xdebug %d.%s (PHP %s)
cmd: %sbug00728-php74.php
part: 1
positions: line

events: Time Memory

fl=(1) php:internal
fn=(1) php::var_dump
6 %d %i

fl=(2) %sbug00728-php74.php
fn=(2) bankaccount->__call
4 %d %i
cfl=(1)
cfn=(1)
calls=1 0 0
6 %d %i

fl=(2)
fn=(3) bankaccount->bar
4 %d %i
cfl=(2)
cfn=(2)
calls=1 0 0
11 %d %i

fl=(1)
fn=(4) php::xdebug_get_profiler_filename
13 %d %i

0 comments on commit 3b85308

Please sign in to comment.
You can’t perform that action at this time.