3v4l.org

run code in 300+ PHP versions simultaneously
<?php function scholar_parse_time($time) { if (preg_match('/^\s*(?P<hour>\d+)(?>:(?P<minute>\d+))(?>:(?P<second>\d+(\.\d*)?))?\s*$/', $time, $match)) { print_r($match); } } (scholar_parse_time('0:1')); (scholar_parse_time('0:1:1')); (scholar_parse_time('0:1:1.1')); (scholar_parse_time('0:1:1.'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d5Nef
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'scholar_parse_time'
          1        SEND_VAL                                                 '0%3A1'
          2        DO_FCALL                                      0          
   12     3        INIT_FCALL                                               'scholar_parse_time'
          4        SEND_VAL                                                 '0%3A1%3A1'
          5        DO_FCALL                                      0          
   13     6        INIT_FCALL                                               'scholar_parse_time'
          7        SEND_VAL                                                 '0%3A1%3A1.1'
          8        DO_FCALL                                      0          
   14     9        INIT_FCALL                                               'scholar_parse_time'
         10        SEND_VAL                                                 '0%3A1%3A1.'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function scholar_parse_time:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/d5Nef
function name:  scholar_parse_time
number of ops:  11
compiled vars:  !0 = $time, !1 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5Cs%2A%28%3FP%3Chour%3E%5Cd%2B%29%28%3F%3E%3A%28%3FP%3Cminute%3E%5Cd%2B%29%29%28%3F%3E%3A%28%3FP%3Csecond%3E%5Cd%2B%28%5C.%5Cd%2A%29%3F%29%29%3F%5Cs%2A%24%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $2      
          6      > JMPZ                                                     $2, ->10
    6     7    >   INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    8    10    > > RETURN                                                   null

End of function scholar_parse_time

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.66 ms | 1399 KiB | 21 Q