3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime(); $o = new ReflectionClass($dt); $p = $o->getProperty('date'); $date = $p->getValue($dt); // returns the value of DateTime::$date
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F3jH7
function name:  (null)
number of ops:  16
compiled vars:  !0 = $dt, !1 = $o, !2 = $p, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        NEW                                              $7      'ReflectionClass'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
    4     7        INIT_METHOD_CALL                                         !1, 'getProperty'
          8        SEND_VAL_EX                                              'date'
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !2, $10
    5    11        INIT_METHOD_CALL                                         !2, 'getValue'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $12     
         14        ASSIGN                                                   !3, $12
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.5 ms | 1393 KiB | 13 Q