3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayPath { const DEFAULT_SEPARATOR = '.'; static private $_sSeparator; public function setSeparator($sSeparator = self::DEFAULT_SEPARATOR) { self::$_sSeparator = $sSeparator; } public function getSeparator() { return self::$_sSeparator ?: self::DEFAULT_SEPARATOR; } } var_dump((new ArrayPath)->setSeparator('/')); var_dump((new ArrayPath)->getSeparator());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oKENY
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $0      'ArrayPath'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'setSeparator'
          4        SEND_VAL_EX                                              '%2F'
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
   19     8        INIT_FCALL                                               'var_dump'
          9        NEW                                              $4      'ArrayPath'
         10        DO_FCALL                                      0          
         11        INIT_METHOD_CALL                                         $4, 'getSeparator'
         12        DO_FCALL                                      0  $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class ArrayPath:
Function setseparator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oKENY
function name:  setSeparator
number of ops:  4
compiled vars:  !0 = $sSeparator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_INIT                                        !0      <const ast>
   10     1        ASSIGN_STATIC_PROP                                       '_sSeparator'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   null

End of function setseparator

Function getseparator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oKENY
function name:  getSeparator
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      '_sSeparator'
          1        JMP_SET                                          ~1      ~0, ->3
          2        QM_ASSIGN                                        ~1      '.'
          3      > RETURN                                                   ~1
   15     4*     > RETURN                                                   null

End of function getseparator

End of class ArrayPath.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.54 ms | 1396 KiB | 15 Q