3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example2 { public function __construct($first, $second) { echo "$first then $second\n"; } } $class = new ReflectionClass(Example2::class); $object = $class->newInstanceArgs(['second' => 'two', 'first' => 'one']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X0kaH
function name:  (null)
number of ops:  9
compiled vars:  !0 = $class, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Example2'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   10     4        INIT_METHOD_CALL                                         !0, 'newInstanceArgs'
          5        SEND_VAL_EX                                              <array>
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
          8      > RETURN                                                   1

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

End of function __construct

End of class Example2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.17 ms | 1442 KiB | 13 Q