3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar(int $a): int { return $a * 2; } } $foo = new Foo(); echo $foo->bar("2");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2NQ8o
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        SEND_VAL_EX                                              '2'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2NQ8o
function name:  bar
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        MUL                                              ~1      !0, 2
          2        VERIFY_RETURN_TYPE                                       ~1
          3      > RETURN                                                   ~1
    7     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.27 ms | 1397 KiB | 13 Q