3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MetaInfo { public $title; public $description; } /** * @param $key string * @return MetaInfo */ function getMeta( $key ) { global $meta; if ( empty($meta[$key]) ) $meta[$key] = new MetaInfo; return $meta[$key]; } getMeta( 'path/to/page' )->title = "Double-check your work before posting"; echo getMeta( 'path/to/page' )->title;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ei6af
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'getmeta'
          1        SEND_VAL                                                 'path%2Fto%2Fpage'
          2        DO_FCALL                                      0  $0      
          3        SEPARATE                                         $0      $0
          4        ASSIGN_OBJ                                               $0, 'title'
          5        OP_DATA                                                  'Double-check+your+work+before+posting'
   24     6        INIT_FCALL                                               'getmeta'
          7        SEND_VAL                                                 'path%2Fto%2Fpage'
          8        DO_FCALL                                      0  $2      
          9        FETCH_OBJ_R                                      ~3      $2, 'title'
         10        ECHO                                                     ~3
         11      > RETURN                                                   1

Function getmeta:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/Ei6af
function name:  getMeta
number of ops:  11
compiled vars:  !0 = $key, !1 = $meta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        BIND_GLOBAL                                              !1, 'meta'
   16     2        ISSET_ISEMPTY_DIM_OBJ                         1          !1, !0
          3      > JMPZ                                                     ~2, ->8
   17     4    >   NEW                                              $4      'MetaInfo'
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !1, !0
          7        OP_DATA                                                  $4
   19     8    >   FETCH_DIM_R                                      ~6      !1, !0
          9      > RETURN                                                   ~6
   20    10*     > RETURN                                                   null

End of function getmeta

Class MetaInfo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.15 ms | 1389 KiB | 15 Q