3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct(private ?string $name = null, private ?string $tag = null, private int $amount) {} } //new Foo(name: 'bar', amount: 123); new Foo('bar', 'tag', 123);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AYo0g
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $0      'Foo'
          1        SEND_VAL_EX                                              'bar'
          2        SEND_VAL_EX                                              'tag'
          3        SEND_VAL_EX                                              123
          4        DO_FCALL                                      0          
          5        FREE                                                     $0
          6      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AYo0g
function name:  __construct
number of ops:  10
compiled vars:  !0 = $name, !1 = $tag, !2 = $amount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        ASSIGN_OBJ                                               'name'
          4        OP_DATA                                                  !0
          5        ASSIGN_OBJ                                               'tag'
          6        OP_DATA                                                  !1
          7        ASSIGN_OBJ                                               'amount'
          8        OP_DATA                                                  !2
          9      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
209.59 ms | 1007 KiB | 13 Q