3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(1 => 1, 2 => 2, 3 => 3); foreach($test as $key => &$value) { } uasort($test, function($a, $b) { if($a > $b) return -1; else if($a > $b) return 1; else return 0; }); print_r($test); foreach($test as $key => $value) { } print_r($test);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 5
filename:       /in/cVa7v
function name:  (null)
number of ops:  23
compiled vars:  !0 = $test, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_RW                                      $4      !0, ->5
          2    > > FE_FETCH_RW                                      ~5      $4, !1, ->5
          3    >   ASSIGN                                                   !2, ~5
          4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $4
    9     6        INIT_FCALL                                               'uasort'
          7        SEND_REF                                                 !0
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FcVa7v%3A9%240'
   16     9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
   18    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   20    14      > FE_RESET_R                                       $10     !0, ->18
         15    > > FE_FETCH_R                                       ~11     $10, !1, ->18
         16    >   ASSIGN                                                   !2, ~11
         17      > JMP                                                      ->15
         18    >   FE_FREE                                                  $10
   25    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FcVa7v%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cVa7v
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        IS_SMALLER                                               !1, !0
          3      > JMPZ                                                     ~2, ->6
   11     4    > > RETURN                                                   -1
          5*       JMP                                                      ->11
   12     6    >   IS_SMALLER                                               !1, !0
          7      > JMPZ                                                     ~3, ->10
   13     8    > > RETURN                                                   1
          9*       JMP                                                      ->11
   15    10    > > RETURN                                                   0
   16    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FcVa7v%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.52 ms | 1400 KiB | 17 Q