3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '[Tue Jun 18 22:25:32 BST 2013] NeoThermic likes B*witched - C"est La Vie'; $bracketpos = strpos($input, '['); $endbracketpos = strpos($input, ']'); $datestamp = substr($input, $bracketpos, $endbracketpos - $bracketpos); $result = strtotime($datestamp); var_dump($datestamp); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7PhHQ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $input, !1 = $bracketpos, !2 = $endbracketpos, !3 = $datestamp, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5BTue+Jun+18+22%3A25%3A32+BST+2013%5D+NeoThermic+likes+B%2Awitched+-+C%22est+La+Vie'
    5     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%5B'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    6     6        INIT_FCALL                                               'strpos'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '%5D'
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    8    11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        SUB                                              ~10     !2, !1
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
   10    18        INIT_FCALL                                               'strtotime'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $13     
         21        ASSIGN                                                   !4, $13
   12    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
   14    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.54 ms | 1395 KiB | 21 Q