3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ '1:10.10', '1.5.07', '0.3', '00:13,40', '15,17', ]; var_export( preg_replace_callback( '~(?:(\d+)\D+)??(?:(\d+)\D+)?(\d+)$~', function($m) { unset($m[0]); return vsprintf('%02d:%02d.%02d', $m); }, $tests ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UvLVC
function name:  (null)
number of ops:  11
compiled vars:  !0 = $tests
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'var_export'
   12     2        INIT_FCALL                                               'preg_replace_callback'
   13     3        SEND_VAL                                                 '%7E%28%3F%3A%28%5Cd%2B%29%5CD%2B%29%3F%3F%28%3F%3A%28%5Cd%2B%29%5CD%2B%29%3F%28%5Cd%2B%29%24%7E'
   14     4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   17     5        SEND_VAL                                                 ~2
   18     6        SEND_VAR                                                 !0
   12     7        DO_ICALL                                         $3      
   18     8        SEND_VAR                                                 $3
   11     9        DO_ICALL                                                 
   20    10      > 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/UvLVC
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        UNSET_DIM                                                !0, 0
   16     2        INIT_FCALL                                               'vsprintf'
          3        SEND_VAL                                                 '%2502d%3A%2502d.%2502d'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   17     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.96 ms | 1015 KiB | 16 Q