3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($array) { usort($array, function($a, $b) { return 1; }); echo json_encode($array), PHP_EOL; } for ($i = 3; $i <= 20; $i++) { test(range(1, $i)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/WiTC0
function name:  (null)
number of ops:  13
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 3
          1      > JMP                                                      ->10
    9     2    >   INIT_FCALL                                               'test'
          3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_FCALL                                      0          
    8     9        PRE_INC                                                  !0
         10    >   IS_SMALLER_OR_EQUAL                                      !0, 20
         11      > JMPNZ                                                    ~5, ->2
   10    12    > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WiTC0
function name:  test
number of ops:  12
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWiTC0%3A4%240'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        ECHO                                                     $3
         10        ECHO                                                     '%0A'
    6    11      > RETURN                                                   null

End of function test

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

End of function %00%7Bclosure%7D%2Fin%2FWiTC0%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.62 ms | 1399 KiB | 20 Q