3v4l.org

run code in 300+ 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}
number of ops:  21
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        INIT_FCALL                                               'strtr'
          3        INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 5
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        SEND_VAL                                                 <array>
          9        DO_ICALL                                         $3      
         10        INIT_FCALL                                               'strtr'
         11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 5
         14        DO_ICALL                                         $4      
         15        SEND_VAR                                                 $4
         16        SEND_VAL                                                 <array>
         17        DO_ICALL                                         $5      
         18        SPACESHIP                                        ~6      $3, $5
         19      > RETURN                                                   ~6
   20    20*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.95 ms | 997 KiB | 17 Q