3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $foo = function (string $bar = null ) { var_dump($bar); }; $foo(); $foo(null); $foo('100'); $foo(100); $foo([100]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OkYTH
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOkYTH%3A6%240'
          1        ASSIGN                                                   !0, ~1
   10     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   11     4        INIT_DYNAMIC_CALL                                        !0
          5        SEND_VAL_EX                                              null
          6        DO_FCALL                                      0          
   12     7        INIT_DYNAMIC_CALL                                        !0
          8        SEND_VAL_EX                                              '100'
          9        DO_FCALL                                      0          
   13    10        INIT_DYNAMIC_CALL                                        !0
         11        SEND_VAL_EX                                              100
         12        DO_FCALL                                      0          
   15    13        INIT_DYNAMIC_CALL                                        !0
         14        SEND_VAL_EX                                              <array>
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOkYTH%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OkYTH
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      null
    7     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FOkYTH%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.82 ms | 1387 KiB | 15 Q