3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime(); $t1 = $date->getTimestamp(); $t2 = $date->format('U'); print gettype($t1) . PHP_EOL; print gettype($t2) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T76Xv
function name:  (null)
number of ops:  17
compiled vars:  !0 = $date, !1 = $t1, !2 = $t2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        INIT_METHOD_CALL                                         !0, 'getTimestamp'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
    6     6        INIT_METHOD_CALL                                         !0, 'format'
          7        SEND_VAL_EX                                              'U'
          8        DO_FCALL                                      0  $8      
          9        ASSIGN                                                   !2, $8
    8    10        GET_TYPE                                         ~10     !1
         11        CONCAT                                           ~11     ~10, '%0A'
         12        ECHO                                                     ~11
    9    13        GET_TYPE                                         ~12     !2
         14        CONCAT                                           ~13     ~12, '%0A'
         15        ECHO                                                     ~13
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.29 ms | 1397 KiB | 13 Q