3v4l.org

run code in 300+ PHP versions simultaneously
<?php $odd = function ($x) { return ($x % 2 === 1)+0; }; $cnt = 0; foreach (range(1,1000) as $x) { $cnt += $odd($x); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/amFZF
function name:  (null)
number of ops:  16
compiled vars:  !0 = $odd, !1 = $cnt, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FamFZF%3A3%240'
          1        ASSIGN                                                   !0, ~3
    5     2        ASSIGN                                                   !1, 0
    6     3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 1000
          6        DO_ICALL                                         $6      
          7      > FE_RESET_R                                       $7      $6, ->14
          8    > > FE_FETCH_R                                               $7, !2, ->14
    7     9    >   INIT_DYNAMIC_CALL                                        !0
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0  $8      
         12        ASSIGN_OP                                     1          !1, $8
    6    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $7
    8    15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FamFZF%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/amFZF
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        MOD                                              ~1      !0, 2
          2        IS_IDENTICAL                                     ~2      ~1, 1
          3        ADD                                              ~3      ~2, 0
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FamFZF%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.8 ms | 1395 KiB | 15 Q