3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add ($a,$b) { $a = $a + $b; return $a; } function main () { for ($i=0;$i<1000;$i++) { add(1,2); add("1","2"); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ft4eV
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   1

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

End of function add

Function main:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
Branch analysis from position: 2
filename:       /in/ft4eV
function name:  main
number of ops:  14
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->11
    9     2    >   INIT_FCALL                                               'add'
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 2
          5        DO_FCALL                                      0          
   10     6        INIT_FCALL                                               'add'
          7        SEND_VAL                                                 '1'
          8        SEND_VAL                                                 '2'
          9        DO_FCALL                                      0          
    8    10        PRE_INC                                                  !0
         11    >   IS_SMALLER                                               !0, 1000
         12      > JMPNZ                                                    ~5, ->2
   12    13    > > RETURN                                                   null

End of function main

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.75 ms | 1399 KiB | 15 Q