3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct($p) { echo $p * 3, "\n"; } } $o1 = new Test($a=8); var_dump($a,$o1); // why?
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8FWCE
function name:  (null)
number of ops:  10
compiled vars:  !0 = $o1, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'Test'
          1        ASSIGN                                           ~3      !1, 8
          2        SEND_VAL_EX                                              ~3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    9     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8FWCE
function name:  __construct
number of ops:  5
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        MUL                                              ~1      !0, 3
          2        ECHO                                                     ~1
          3        ECHO                                                     '%0A'
    6     4      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.17 ms | 1395 KiB | 15 Q