3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const FIELD_1 = 'field1'; const FIELD_2 = 'field2'; const FIELD_A = 'fieldA'; const FIELD_B = 'fieldB'; private $field = array( self::FIELD_1 => self::FIELD_A, self::FIELD_2 => self::FIELD_B ); public function getField() { return $this->field; } } $a = new A; $str = var_export($a->getField()); echo '$field = ' . $str . ';';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ItjAN
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   21     3        INIT_FCALL                                               'var_export'
          4        INIT_METHOD_CALL                                         !0, 'getField'
          5        DO_FCALL                                      0  $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
   23     9        CONCAT                                           ~8      '%24field+%3D+', !1
         10        CONCAT                                           ~9      ~8, '%3B'
         11        ECHO                                                     ~9
         12      > RETURN                                                   1

Class A:
Function getfield:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ItjAN
function name:  getField
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~0      'field'
          1      > RETURN                                                   ~0
   17     2*     > RETURN                                                   null

End of function getfield

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.96 ms | 1395 KiB | 15 Q