3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { public function __construct(int $number, string $name, float $currency) { var_export(func_get_args()); } } new Foo(1, 'Mag', 3.99); new Foo('not a number', 1, 'not a float');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gpmdd
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'Foo'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              'Mag'
          3        SEND_VAL_EX                                              3.99
          4        DO_FCALL                                      0          
          5        FREE                                                     $0
   14     6        NEW                                              $2      'Foo'
          7        SEND_VAL_EX                                              'not+a+number'
          8        SEND_VAL_EX                                              1
          9        SEND_VAL_EX                                              'not+a+float'
         10        DO_FCALL                                      0          
         11        FREE                                                     $2
         12      > RETURN                                                   1

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

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.02 ms | 1395 KiB | 15 Q