3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const DEFAULT_VERSION = "1.2.3"; public function pingAction($version = self::DEFAULT_VERSION) { var_dump($version); } } $x = new Foo(); $x.pingAction("0.0.0"); $x.pingAction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/socHY
function name:  (null)
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_FCALL_BY_NAME                                       'pingAction'
          4        SEND_VAL_EX                                              '0.0.0'
          5        DO_FCALL                                      0  $4      
          6        CONCAT                                           ~5      !0, $4
          7        FREE                                                     ~5
   15     8        INIT_FCALL_BY_NAME                                       'pingAction'
          9        DO_FCALL                                      0  $6      
         10        CONCAT                                           ~7      !0, $6
         11        FREE                                                     ~7
         12      > RETURN                                                   1

Class Foo:
Function pingaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/socHY
function name:  pingAction
number of ops:  5
compiled vars:  !0 = $version
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      <const ast>
    9     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   10     4      > RETURN                                                   null

End of function pingaction

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.9 ms | 1395 KiB | 15 Q