3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testowa { public function testownik() { $x = function(&$y) { $y[] = rand(10,1000); }; $array = []; for($i=0;$i<100000;$i++) { $x($array); } unset($array); } } $klasa = new testowa(); $zmienna1 = $zmienna2 = []; $klasa->testownik($zmienna1, $zmienna2, 123); die("OK!");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/5LJoi
function name:  (null)
number of ops:  12
compiled vars:  !0 = $klasa, !1 = $zmienna1, !2 = $zmienna2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $3      'testowa'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   16     3        ASSIGN                                           ~6      !2, <array>
          4        ASSIGN                                                   !1, ~6
   17     5        INIT_METHOD_CALL                                         !0, 'testownik'
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !2
          8        SEND_VAL_EX                                              123
          9        DO_FCALL                                      0          
   18    10      > EXIT                                                     'OK%21'
         11*     > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F5LJoi%3A5%240

Class testowa:
Function testownik:
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 = 62) 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/5LJoi
function name:  testownik
number of ops:  13
compiled vars:  !0 = $x, !1 = $array, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5LJoi%3A5%240'
          1        ASSIGN                                                   !0, ~3
    8     2        ASSIGN                                                   !1, <array>
    9     3        ASSIGN                                                   !2, 0
          4      > JMP                                                      ->9
   10     5    >   INIT_DYNAMIC_CALL                                        !0
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
    9     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, 100000
         10      > JMPNZ                                                    ~9, ->5
   12    11    >   UNSET_CV                                                 !1
   13    12      > RETURN                                                   null

End of function testownik

End of class testowa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.21 ms | 1392 KiB | 15 Q