3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $test = "deuxieme"; function __destruct() { echo "destruct a"; } } $object = new a(); function output($buffer) { global $object; return $buffer."[".var_export($object, true)."] ".$object->test; } ob_start('output'); echo "premier ";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EArKP
function name:  (null)
number of ops:  8
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_FCALL                                               'ob_start'
          4        SEND_VAL                                                 'output'
          5        DO_ICALL                                                 
   23     6        ECHO                                                     'premier+'
          7      > RETURN                                                   1

Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EArKP
function name:  output
number of ops:  13
compiled vars:  !0 = $buffer, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        BIND_GLOBAL                                              !1, 'object'
   18     2        CONCAT                                           ~2      !0, '%5B'
          3        INIT_FCALL                                               'var_export'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $3      
          7        CONCAT                                           ~4      ~2, $3
          8        CONCAT                                           ~5      ~4, '%5D+'
          9        FETCH_OBJ_R                                      ~6      !1, 'test'
         10        CONCAT                                           ~7      ~5, ~6
         11      > RETURN                                                   ~7
   19    12*     > RETURN                                                   null

End of function output

Class a:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EArKP
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'destruct+a'
   10     1      > RETURN                                                   null

End of function __destruct

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.19 ms | 1396 KiB | 17 Q