3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; array_push($array, 0); array_push($array, 0.64470922960398); array_push($array, 0.41076734188039); array_push($array, 0.20185418833199); array_push($array, 0.18053564755758); array_push($array, 0.42409442817103); array_push($array, 0.60058510748602); asort($array); print_r($array); asort($array, SORT_NUMERIC); print_r($array); $array = array_map(function ($num) { return (int)($num * 10); }, $array); asort($array); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aKZKu
function name:  (null)
number of ops:  56
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_push'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 0
          4        DO_ICALL                                                 
    5     5        INIT_FCALL                                               'array_push'
          6        SEND_REF                                                 !0
          7        SEND_VAL                                                 0.644709
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'array_push'
         10        SEND_REF                                                 !0
         11        SEND_VAL                                                 0.410767
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'array_push'
         14        SEND_REF                                                 !0
         15        SEND_VAL                                                 0.201854
         16        DO_ICALL                                                 
    8    17        INIT_FCALL                                               'array_push'
         18        SEND_REF                                                 !0
         19        SEND_VAL                                                 0.180536
         20        DO_ICALL                                                 
    9    21        INIT_FCALL                                               'array_push'
         22        SEND_REF                                                 !0
         23        SEND_VAL                                                 0.424094
         24        DO_ICALL                                                 
   10    25        INIT_FCALL                                               'array_push'
         26        SEND_REF                                                 !0
         27        SEND_VAL                                                 0.600585
         28        DO_ICALL                                                 
   12    29        INIT_FCALL                                               'asort'
         30        SEND_REF                                                 !0
         31        DO_ICALL                                                 
   13    32        INIT_FCALL                                               'print_r'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                                 
   15    35        INIT_FCALL                                               'asort'
         36        SEND_REF                                                 !0
         37        FETCH_CONSTANT                                   ~11     '%C2%A0SORT_NUMERIC'
         38        SEND_VAL                                                 ~11
         39        DO_ICALL                                                 
   16    40        INIT_FCALL                                               'print_r'
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                                 
   18    43        INIT_FCALL                                               'array_map'
         44        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaKZKu%3A18%240'
         45        SEND_VAL                                                 ~14
         46        SEND_VAR                                                 !0
         47        DO_ICALL                                         $15     
         48        ASSIGN                                                   !0, $15
   19    49        INIT_FCALL                                               'asort'
         50        SEND_REF                                                 !0
         51        DO_ICALL                                                 
   20    52        INIT_FCALL                                               'print_r'
         53        SEND_VAR                                                 !0
         54        DO_ICALL                                                 
         55      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FaKZKu%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.44 ms | 1400 KiB | 21 Q