3v4l.org

run code in 300+ PHP versions simultaneously
<?php function __( $content ) { return $content; } class WP_Locale { public $weekday; public function __construct() { $this->init(); $this->register_globals(); } public function init() { // The weekdays. $this->weekday[0] = /* translators: Weekday. */ __( 'Sunday' ); $this->weekday[1] = /* translators: Weekday. */ __( 'Monday' ); $this->weekday[2] = /* translators: Weekday. */ __( 'Tuesday' ); $this->weekday[3] = /* translators: Weekday. */ __( 'Wednesday' ); $this->weekday[4] = /* translators: Weekday. */ __( 'Thursday' ); $this->weekday[5] = /* translators: Weekday. */ __( 'Friday' ); $this->weekday[6] = /* translators: Weekday. */ __( 'Saturday' ); } public function register_globals() {} } // Should not throw a notice for: // Notice: Trying to access array offset on value of type null. $wp_locale = new WP_Locale(); var_dump( $wp_locale->weekday );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PtmGf
function name:  (null)
number of ops:  8
compiled vars:  !0 = $wp_locale
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   NEW                                              $1      'WP_Locale'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   32     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~4      !0, 'weekday'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function __:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PtmGf
function name:  __
number of ops:  3
compiled vars:  !0 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1      > RETURN                                                   !0
    5     2*     > RETURN                                                   null

End of function __

Class WP_Locale:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PtmGf
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'init'
          1        DO_FCALL                                      0          
   12     2        INIT_METHOD_CALL                                         'register_globals'
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function __construct

Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PtmGf
function name:  init
number of ops:  43
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               '__'
          1        SEND_VAL                                                 'Sunday'
          2        DO_FCALL                                      0  $2      
          3        FETCH_OBJ_W                                      $0      'weekday'
          4        ASSIGN_DIM                                               $0, 0
          5        OP_DATA                                                  $2
   18     6        INIT_FCALL                                               '__'
          7        SEND_VAL                                                 'Monday'
          8        DO_FCALL                                      0  $5      
          9        FETCH_OBJ_W                                      $3      'weekday'
         10        ASSIGN_DIM                                               $3, 1
         11        OP_DATA                                                  $5
   19    12        INIT_FCALL                                               '__'
         13        SEND_VAL                                                 'Tuesday'
         14        DO_FCALL                                      0  $8      
         15        FETCH_OBJ_W                                      $6      'weekday'
         16        ASSIGN_DIM                                               $6, 2
         17        OP_DATA                                                  $8
   20    18        INIT_FCALL                                               '__'
         19        SEND_VAL                                                 'Wednesday'
         20        DO_FCALL                                      0  $11     
         21        FETCH_OBJ_W                                      $9      'weekday'
         22        ASSIGN_DIM                                               $9, 3
         23        OP_DATA                                                  $11
   21    24        INIT_FCALL                                               '__'
         25        SEND_VAL                                                 'Thursday'
         26        DO_FCALL                                      0  $14     
         27        FETCH_OBJ_W                                      $12     'weekday'
         28        ASSIGN_DIM                                               $12, 4
         29        OP_DATA                                                  $14
   22    30        INIT_FCALL                                               '__'
         31        SEND_VAL                                                 'Friday'
         32        DO_FCALL                                      0  $17     
         33        FETCH_OBJ_W                                      $15     'weekday'
         34        ASSIGN_DIM                                               $15, 5
         35        OP_DATA                                                  $17
   23    36        INIT_FCALL                                               '__'
         37        SEND_VAL                                                 'Saturday'
         38        DO_FCALL                                      0  $20     
         39        FETCH_OBJ_W                                      $18     'weekday'
         40        ASSIGN_DIM                                               $18, 6
         41        OP_DATA                                                  $20
   24    42      > RETURN                                                   null

End of function init

Function register_globals:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PtmGf
function name:  register_globals
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E > > RETURN                                                   null

End of function register_globals

End of class WP_Locale.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.4 ms | 1458 KiB | 21 Q