3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convertToSeconds($time) { if (!preg_match('/(\d{1,2}):(\d{2})/', $time)) { return 0; } return preg_replace_callback('/(\d{1,2}):(\d{2})/', function($e) { return $e[1] * 60 + $e[2]; }, $time); } echo convertToSeconds('02:22');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ncfog
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'converttoseconds'
          1        SEND_VAL                                                 '02%3A22'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function converttoseconds:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ncfog
function name:  convertToSeconds
number of ops:  16
compiled vars:  !0 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%28%5Cd%7B1%2C2%7D%29%3A%28%5Cd%7B2%7D%29%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        BOOL_NOT                                         ~2      $1
          6      > JMPZ                                                     ~2, ->8
    5     7    > > RETURN                                                   0
    7     8    >   INIT_FCALL                                               'preg_replace_callback'
          9        SEND_VAL                                                 '%2F%28%5Cd%7B1%2C2%7D%29%3A%28%5Cd%7B2%7D%29%2F'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fncfog%3A7%240'
    9    11        SEND_VAL                                                 ~3
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $4      
         14      > RETURN                                                   $4
   10    15*     > RETURN                                                   null

End of function converttoseconds

Function %00%7Bclosure%7D%2Fin%2Fncfog%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ncfog
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        FETCH_DIM_R                                      ~1      !0, 1
          2        MUL                                              ~2      ~1, 60
          3        FETCH_DIM_R                                      ~3      !0, 2
          4        ADD                                              ~4      ~2, ~3
          5      > RETURN                                                   ~4
    9     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fncfog%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.94 ms | 1399 KiB | 18 Q