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(), true); echo '$field = ' . $str . ';';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DRM60
function name:  (null)
number of ops:  14
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        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
   23    10        CONCAT                                           ~8      '%24field+%3D+', !1
         11        CONCAT                                           ~9      ~8, '%3B'
         12        ECHO                                                     ~9
         13      > RETURN                                                   1

Class A:
Function getfield:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DRM60
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:
183.57 ms | 1395 KiB | 15 Q