3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = function(&$y) { $y[] = rand(10,1000); }; $array = []; for($i=0;$i<100000;$i++) { $x($array); } unset($array); die("OK!");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/hZ1Td
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x, !1 = $array, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FhZ1Td%3A2%240'
          1        ASSIGN                                                   !0, ~3
    5     2        ASSIGN                                                   !1, <array>
    6     3        ASSIGN                                                   !2, 0
          4      > JMP                                                      ->9
    7     5    >   INIT_DYNAMIC_CALL                                        !0
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
    6     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, 100000
         10      > JMPNZ                                                    ~9, ->5
    9    11    >   UNSET_CV                                                 !1
   10    12      > EXIT                                                     'OK%21'
         13*     > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FhZ1Td%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hZ1Td
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'rand'
          2        SEND_VAL                                                 10
          3        SEND_VAL                                                 1000
          4        DO_ICALL                                         $2      
          5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  $2
    4     7      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FhZ1Td%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.75 ms | 1395 KiB | 15 Q