3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Thing { function do(int $b) : int { return $b; } } $a = [1, "2"]; $t = new Thing(); $x = $t->do($a[0]); $x = $t->do($a[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DfNOR
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $t, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   13     1        NEW                                              $4      'Thing'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   14     4        INIT_METHOD_CALL                                         !1, 'do'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_DIM_FUNC_ARG                               $7      !0, 0
          7        SEND_FUNC_ARG                                            $7
          8        DO_FCALL                                      0  $8      
          9        ASSIGN                                                   !2, $8
   15    10        INIT_METHOD_CALL                                         !1, 'do'
         11        CHECK_FUNC_ARG                                           
         12        FETCH_DIM_FUNC_ARG                               $10     !0, 1
         13        SEND_FUNC_ARG                                            $10
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !2, $11
         16      > RETURN                                                   1

Class Thing:
Function do:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DfNOR
function name:  do
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        VERIFY_RETURN_TYPE                                       !0
          2      > RETURN                                                   !0
    9     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function do

End of class Thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
261.44 ms | 1007 KiB | 13 Q