3v4l.org

run code in 500+ PHP versions simultaneously
<?php // New syntax since PHP 7.4 $a = [3, 2, 5, 6, 1]; usort($a, fn($a, $b) => $a<=>$b); foreach ($a as $key => $value) { echo "$key: $value\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/c0n8c
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $value, !2 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, <array>
    6     1        INIT_FCALL                                                   'usort'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          4        SEND_VAL                                                     ~4
          5        DO_ICALL                                                     
    8     6      > FE_RESET_R                                           $6      !0, ->15
          7    > > FE_FETCH_R                                           ~7      $6, !1, ->15
          8    >   ASSIGN                                                       !2, ~7
    9     9        ROPE_INIT                                         4  ~10     !2
         10        ROPE_ADD                                          1  ~10     ~10, '%3A+'
         11        ROPE_ADD                                          2  ~10     ~10, !1
         12        ROPE_END                                          3  ~9      ~10, '%0A'
         13        ECHO                                                         ~9
    8    14      > JMP                                                          ->7
         15    >   FE_FREE                                                      $6
   10    16      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c0n8c
function name:  {closure:/in/c0n8c:6}
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        SPACESHIP                                            ~2      !0, !1
          3      > RETURN                                                       ~2
          4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.08 ms | 2290 KiB | 14 Q