3v4l.org

run code in 500+ PHP versions simultaneously
<?php function test() { // The closing marker (and body) are indented. // PHP >= 7.3: parses; the leading indentation is stripped based on the // closing marker's indentation, so $value === "Indented heredoc body.". // PHP < 7.3: fatal parse error — the closing marker MUST be at column 0, // so the indented "EOT" is not recognised as the terminator. $value = <<<EOT Indented heredoc body. EOT; return $value; } echo test(), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OTXL2
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                                   'test'
          1        DO_FCALL                                          0  $0      
          2        ECHO                                                         $0
          3        ECHO                                                         '%0A'
          4      > RETURN                                                       1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OTXL2
function name:  test
number of ops:  3
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                       !0, 'Indented+heredoc+body.'
   14     1      > RETURN                                                       !0
   15     2*     > RETURN                                                       null

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.77 ms | 3378 KiB | 14 Q