3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = array('E1', 'E2', 'E4','E5','E0','E9','E8'); natsort($n); print_r($n); reset($n); print_r($n); usort ($n , function($a,$b){ return strnatcmp($a,$b); }); print_r($n);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JBOaM
function name:  (null)
number of ops:  22
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'natsort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    6     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'reset'
          8        SEND_REF                                                 !0
          9        DO_ICALL                                                 
    8    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   10    13        INIT_FCALL                                               'usort'
         14        SEND_REF                                                 !0
         15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJBOaM%3A10%240'
         16        SEND_VAL                                                 ~6
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FJBOaM%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.57 ms | 1396 KiB | 23 Q