3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(int $foo, int $bar) { echo $foo + $bar; } var_dump(foo(1, 1)); // affiche 2 var_dump(foo(1, '1')); // affiche 2 (conversion car mode coercitif) var_dump(foo('a', 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T66P1
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'foo'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 1
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
    9     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'foo'
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 '1'
         11        DO_FCALL                                      0  $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                                 
   10    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'foo'
         16        SEND_VAL                                                 'a'
         17        SEND_VAL                                                 1
         18        DO_FCALL                                      0  $4      
         19        SEND_VAR                                                 $4
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T66P1
function name:  foo
number of ops:  5
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ADD                                              ~2      !0, !1
          3        ECHO                                                     ~2
    6     4      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.37 ms | 1389 KiB | 18 Q