3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function __construct($a, $b) { var_dump($a, $b); } } class Bar { public function __construct($a) { var_dump($a); } } class Baz { public function __construct($a, $b) { parent::__construct($a, $b); } } $baz = new Baz("foo", "bar");
based on dbc21
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/dsE92
function name:  (null)
number of ops:  9
compiled vars:  !0 = $baz
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  10     1        NOP                                                      
  17     2        NOP                                                      
  24     3        NEW                                              $4      :-6
         4        SEND_VAL_EX                                              'foo'
         5        SEND_VAL_EX                                              'bar'
         6        DO_FCALL                                      0          
         7        ASSIGN                                                   !0, $4
         8      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/dsE92
function name:  __construct
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   RECV                                             !0      
         1        RECV                                             !1      
   6     2        INIT_FCALL                                               'var_dump'
         3        SEND_VAR                                                 !0
         4        SEND_VAR                                                 !1
         5        DO_ICALL                                                 
   7     6      > RETURN                                                   null

End of function __construct

End of class Foo.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/dsE92
function name:  __construct
number of ops:  5
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  11     0  E >   RECV                                             !0      
  13     1        INIT_FCALL                                               'var_dump'
         2        SEND_VAR                                                 !0
         3        DO_ICALL                                                 
  14     4      > RETURN                                                   null

End of function __construct

End of class Bar.

Class Baz:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/dsE92
function name:  __construct
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  18     0  E >   RECV                                             !0      
         1        RECV                                             !1      
  20     2        FETCH_CLASS                                 514  :2      
         3        INIT_STATIC_METHOD_CALL                                  $2
         4        SEND_VAR_EX                                              !0
         5        SEND_VAR_EX                                              !1
         6        DO_FCALL                                      0          
  21     7      > RETURN                                                   null

End of function __construct

End of class Baz.

Generated using Vulcan Logic Dumper, using php 7.3.0