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; } echo stringToTimestamp("1374366918") === "1374366918";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AkIFY
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'stringtotimestamp'
          1        SEND_VAL                                                 '1374366918'
          2        DO_FCALL                                      0  $0      
          3        IS_IDENTICAL                                     ~1      $0, '1374366918'
          4        ECHO                                                     ~1
          5      > 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/AkIFY
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:
165.52 ms | 1397 KiB | 16 Q