3v4l.org

run code in 500+ PHP versions simultaneously
<?php $telefones = [ '(11) 3333-4353', '(11) 98000-2222', '(11) 3027-5555', '(11) 97000-0333', '(12) 99999-9999', '(12) 88888-8888', '(13) 11111-1111' ]; $inicio = microtime(true); for($i = 0; $i < 50000; $i++){ usort($telefones, function ($a, $b) { return strtr(substr($a, 5), ['-' => '']) <=> strtr(substr($b, 5), ['-' => '']); }); } echo 'Inkeliz:' . (microtime(true) - $inicio) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
Branch analysis from position: 7
filename:       /in/inGg0
function name:  (null)
number of ops:  23
compiled vars:  !0 = $telefones, !1 = $inicio, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   15     1        INIT_FCALL                                                   'microtime'
          2        SEND_VAL                                                     <true>
          3        DO_ICALL                                             $4      
          4        ASSIGN                                                       !1, $4
   17     5        ASSIGN                                                       !2, 0
          6      > JMP                                                          ->13
   18     7    >   INIT_FCALL                                                   'usort'
          8        SEND_REF                                                     !0
          9        DECLARE_LAMBDA_FUNCTION                              ~7      [0]
   20    10        SEND_VAL                                                     ~7
   18    11        DO_ICALL                                                     
   17    12        PRE_INC                                                      !2
         13    >   IS_SMALLER                                                   !2, 50000
         14      > JMPNZ                                                        ~10, ->7
   23    15    >   INIT_FCALL                                                   'microtime'
         16        SEND_VAL                                                     <true>
         17        DO_ICALL                                             $11     
         18        SUB                                                  ~12     $11, !1
         19        CONCAT                                               ~13     'Inkeliz%3A', ~12
         20        CONCAT                                               ~14     ~13, '%0A'
         21        ECHO                                                         ~14
         22      > 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/inGg0
function name:  {closure:/in/inGg0:18}
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   19     2        FRAMELESS_ICALL_2                substr              ~2      !0, 5
          3        FRAMELESS_ICALL_2                strtr               ~3      ~2, <array>
          4        FRAMELESS_ICALL_2                substr              ~4      !1, 5
          5        FRAMELESS_ICALL_2                strtr               ~5      ~4, <array>
          6        SPACESHIP                                            ~6      ~3, ~5
          7      > RETURN                                                       ~6
   20     8*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.85 ms | 1208 KiB | 15 Q