Skip to content

Commit

Permalink
Splitting the test case where the PHP 5.5 variant has more information.
Browse files Browse the repository at this point in the history
Finally, the internally called functions show up again! This was missing since
PHP 5.0.
  • Loading branch information
derickr committed Nov 24, 2012
1 parent 8b6058c commit 1d7c6b6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/array_map-php55.phpt
@@ -0,0 +1,37 @@
--TEST--
Test with internal callbacks
--SKIPIF--
<?php if (!version_compare(phpversion(), "5.5", '>=')) echo "skip >= PHP 5.5 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.collect_params=3
xdebug.collect_return=0
xdebug.collect_assignments=0
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
xdebug.var_display_max_depth=2
xdebug.var_display_max_children=3
--FILE--
<?php
$tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));

$ar = array('a', 'bb', 'ccc');
$r = array_map('strlen', $ar);

echo gettype($r), "\n";

echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
array
TRACE START [%d-%d-%d %d:%d:%d]
%w%f %w%d -> array_map('strlen', array (0 => 'a', 1 => 'bb', 2 => 'ccc')) /%s/array_map-php55.php:5
%w%f %w%d -> strlen('a') /%s/array_map-php55.php:5
%w%f %w%d -> strlen('bb') /%s/array_map-php55.php:5
%w%f %w%d -> strlen('ccc') /%s/array_map-php55.php:5
%w%f %w%d -> gettype(array (0 => 1, 1 => 2, 2 => 3)) /%s/array_map-php55.php:7
%w%f %w%d -> file_get_contents('/tmp/%s') /%s/array_map-php55.php:9
2 changes: 2 additions & 0 deletions tests/array_map.phpt
@@ -1,5 +1,7 @@
--TEST--
Test with internal callbacks
--SKIPIF--
<?php if (!version_compare(phpversion(), "5.5", '<')) echo "skip < PHP 5.5 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
Expand Down

0 comments on commit 1d7c6b6

Please sign in to comment.