3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { public function getTest($bar = null) { if($bar === 'test'){ return 1; } } } $test = new Foo(); var_dump($test->getTest() === null);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hn6F0
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   NEW                                                  $1      'Foo'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   16     3        INIT_FCALL                                                   'var_dump'
          4        INIT_METHOD_CALL                                             !0, 'getTest'
          5        DO_FCALL                                          0  $4      
          6        TYPE_CHECK                                        2  ~5      $4
          7        SEND_VAL                                                     ~5
          8        DO_ICALL                                                     
          9      > RETURN                                                       1

Class Foo:
Function gettest:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hn6F0
function name:  getTest
number of ops:  5
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                            !0      null
    8     1        IS_IDENTICAL                                                 !0, 'test'
          2      > JMPZ                                                         ~1, ->4
    9     3    > > RETURN                                                       1
   11     4    > > RETURN                                                       null

End of function gettest

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.24 ms | 477 KiB | 8 Q