<?php
// This displays "/path/to/example_url.php :"
$backtrace_message1 = '/path/to/example_url.php : 777';
// This displays "/path/to/example_url.php : 777 :"
$backtrace_message2 = '/path/to/example_url.php : 777 : 0';
// This displays "(unknown)"
$backtrace_message3 = '/path/to/example_url.php : 777 :';
// This displays "(unknown)"
$backtrace_message4 = '/path/to/example_url.php : 777 : 77 :';
// This displays "/path/to/example_url.php : 777 : 77 :"
$backtrace_message5 = '/path/to/example_url.php : 777 : 77 : 7';
// This displays "/path/to/example_url.php : 7777 : 777 : 77 :"
$backtrace_message6 = '/path/to/example_url.php : 7777 : 777 : 77 : 7';
header( 'X-ChromeLogger-Data: ' . base64_encode( utf8_encode( json_encode( [
'version' => '0.0.1',
'columns' => [
'log',
'backtrace',
'type'
],
'request_uri' => 'example_url.php',
'rows' => [
[
['epoch: ' . time()],
$backtrace_message1,
''
],
[
['epoch: ' . time()],
$backtrace_message2,
''
],
[
['epoch: ' . time()],
$backtrace_message3,
''
],
[
['epoch: ' . time()],
$backtrace_message4,
''
],
[
['epoch: ' . time()],
$backtrace_message5,
''
],
[
['epoch: ' . time()],
$backtrace_message6,
''
]
]
] ) ) ) );
Backtrace message #1 is what you would expect to see in the Firefox 43 console, but the line number is stripped off: