3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! function stringToTimestamp($timestamp) { $newTimestamp = strtotime($timestamp); if ($newTimestamp === FALSE) { return $timestamp; } return $newTimestamp; } print_r(stringToTimestamp("1374366918"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l8kU8
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'stringtotimestamp'
          2        SEND_VAL                                                 '1374366918'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function stringtotimestamp:
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/l8kU8
function name:  stringToTimestamp
number of ops:  10
compiled vars:  !0 = $timestamp, !1 = $newTimestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !1, $2
    7     5        TYPE_CHECK                                    4          !1
          6      > JMPZ                                                     ~4, ->8
    8     7    > > RETURN                                                   !0
   11     8    > > RETURN                                                   !1
   12     9*     > RETURN                                                   null

End of function stringtotimestamp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.67 ms | 1397 KiB | 18 Q