3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('Client Technical Specialist', 'Client Technical Specialist - PTA', 'CTM', 'A Test Elemetn', 'Cats', 'ZZZZZZ'); usort($arr, function($a, $b){ return strcasecmp($a, $b); }); echo 'strcasecmp: ' . join(', ', $arr) . '<br>'; usort($arr, function($a, $b){ return strnatcmp($a, $b); }); echo 'strnatcmp: ' . join(', ', $arr) . '<br>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nrUi1
function name:  (null)
number of ops:  26
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FnrUi1%3A4%240'
    6     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
    7     6        INIT_FCALL                                               'join'
          7        SEND_VAL                                                 '%2C+'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        CONCAT                                           ~5      'strcasecmp%3A+', $4
         11        CONCAT                                           ~6      ~5, '%3Cbr%3E'
         12        ECHO                                                     ~6
    9    13        INIT_FCALL                                               'usort'
         14        SEND_REF                                                 !0
         15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FnrUi1%3A9%241'
   11    16        SEND_VAL                                                 ~7
         17        DO_ICALL                                                 
   12    18        INIT_FCALL                                               'join'
         19        SEND_VAL                                                 '%2C+'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $9      
         22        CONCAT                                           ~10     'strnatcmp%3A+', $9
         23        CONCAT                                           ~11     ~10, '%3Cbr%3E'
         24        ECHO                                                     ~11
         25      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FnrUi1%3A4%240

Function %00%7Bclosure%7D%2Fin%2FnrUi1%3A9%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nrUi1
function name:  {closure}
number of ops:  8
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        INIT_FCALL                                               'strnatcmp'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   11     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FnrUi1%3A9%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.44 ms | 1400 KiB | 21 Q