3v4l.org

run code in 300+ PHP versions simultaneously
<?php $end_date = new DateTime('2014-07-11 14:00:00'); $begin_date = new DateTime('2014-07-11 09:15:00'); echo "begin_date is " . $begin_date->format('Y-m-d H:i:s') . " and end_date is " . $end_date->format('Y-m-d H:i:s') . "<br>"; $diff = $end_date->diff($begin_date); echo "The difference is " . $diff->h . " hours and " . $diff->i . " minutes.<br>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8nVjn
function name:  (null)
number of ops:  31
compiled vars:  !0 = $end_date, !1 = $begin_date, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2014-07-11+14%3A00%3A00'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    6     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2014-07-11+09%3A15%3A00'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    8     8        INIT_METHOD_CALL                                         !1, 'format'
          9        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         10        DO_FCALL                                      0  $9      
         11        CONCAT                                           ~10     'begin_date+is+', $9
         12        CONCAT                                           ~11     ~10, '+and+end_date+is+'
         13        INIT_METHOD_CALL                                         !0, 'format'
         14        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         15        DO_FCALL                                      0  $12     
         16        CONCAT                                           ~13     ~11, $12
         17        CONCAT                                           ~14     ~13, '%3Cbr%3E'
         18        ECHO                                                     ~14
   10    19        INIT_METHOD_CALL                                         !0, 'diff'
         20        SEND_VAR_EX                                              !1
         21        DO_FCALL                                      0  $15     
         22        ASSIGN                                                   !2, $15
   11    23        FETCH_OBJ_R                                      ~17     !2, 'h'
         24        CONCAT                                           ~18     'The+difference+is+', ~17
         25        CONCAT                                           ~19     ~18, '+hours+and+'
         26        FETCH_OBJ_R                                      ~20     !2, 'i'
         27        CONCAT                                           ~21     ~19, ~20
         28        CONCAT                                           ~22     ~21, '+minutes.%3Cbr%3E'
         29        ECHO                                                     ~22
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.96 ms | 1395 KiB | 13 Q