3v4l.org

run code in 300+ PHP versions simultaneously
<?php function echo_sorted($a) { echo "{$a[0]} {$a[1]} {$a[2]}"; sort($a); echo " => {$a[0]} {$a[1]} {$a[2]}\n"; } echo_sorted(array( "10", "1a", "2")); // => 10 1a 2 echo_sorted(array( "10", "2", "1a")); // => 1a 2 10 echo_sorted(array( "1a", "10", "2")); // => 2 10 1a echo_sorted(array( "1a", "2", "10")); // => 1a 2 10 echo_sorted(array( "2", "10", "1a")); // => 2 10 1a echo_sorted(array( "2", "1a", "10")); // => 10 1a 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TMEbq
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'echo_sorted'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0          
   11     3        INIT_FCALL                                               'echo_sorted'
          4        SEND_VAL                                                 <array>
          5        DO_FCALL                                      0          
   12     6        INIT_FCALL                                               'echo_sorted'
          7        SEND_VAL                                                 <array>
          8        DO_FCALL                                      0          
   13     9        INIT_FCALL                                               'echo_sorted'
         10        SEND_VAL                                                 <array>
         11        DO_FCALL                                      0          
   14    12        INIT_FCALL                                               'echo_sorted'
         13        SEND_VAL                                                 <array>
         14        DO_FCALL                                      0          
   15    15        INIT_FCALL                                               'echo_sorted'
         16        SEND_VAL                                                 <array>
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Function echo_sorted:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TMEbq
function name:  echo_sorted
number of ops:  25
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        FETCH_DIM_R                                      ~1      !0, 0
          2        ROPE_INIT                                     5  ~5      ~1
          3        ROPE_ADD                                      1  ~5      ~5, '+'
          4        FETCH_DIM_R                                      ~2      !0, 1
          5        ROPE_ADD                                      2  ~5      ~5, ~2
          6        ROPE_ADD                                      3  ~5      ~5, '+'
          7        FETCH_DIM_R                                      ~3      !0, 2
          8        ROPE_END                                      4  ~4      ~5, ~3
          9        ECHO                                                     ~4
    6    10        INIT_FCALL                                               'sort'
         11        SEND_REF                                                 !0
         12        DO_ICALL                                                 
    7    13        ROPE_INIT                                     7  ~13     '+%3D%3E+'
         14        FETCH_DIM_R                                      ~9      !0, 0
         15        ROPE_ADD                                      1  ~13     ~13, ~9
         16        ROPE_ADD                                      2  ~13     ~13, '+'
         17        FETCH_DIM_R                                      ~10     !0, 1
         18        ROPE_ADD                                      3  ~13     ~13, ~10
         19        ROPE_ADD                                      4  ~13     ~13, '+'
         20        FETCH_DIM_R                                      ~11     !0, 2
         21        ROPE_ADD                                      5  ~13     ~13, ~11
         22        ROPE_END                                      6  ~12     ~13, '%0A'
         23        ECHO                                                     ~12
    8    24      > RETURN                                                   null

End of function echo_sorted

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.74 ms | 1021 KiB | 20 Q