3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function testArrayOfTuples($arrayOfTuples) { print_r($arrayOfTuples); if ($arrayOfTuples == null) { print_r("Got a NULL array of tuples!"); } else { print_r(count($arrayOfTuples)); } } } $a = new A; $a->testArrayOfTuples([]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G2elC
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'testArrayOfTuples'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class A:
Function testarrayoftuples:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G2elC
function name:  testArrayOfTuples
number of ops:  15
compiled vars:  !0 = $arrayOfTuples
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   10     4        IS_EQUAL                                                 !0, null
          5      > JMPZ                                                     ~2, ->10
   11     6    >   INIT_FCALL                                               'print_r'
          7        SEND_VAL                                                 'Got+a+NULL+array+of+tuples%21'
          8        DO_ICALL                                                 
          9      > JMP                                                      ->14
   13    10    >   INIT_FCALL                                               'print_r'
         11        COUNT                                            ~4      !0
         12        SEND_VAL                                                 ~4
         13        DO_ICALL                                                 
   15    14    > > RETURN                                                   null

End of function testarrayoftuples

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.99 ms | 1395 KiB | 15 Q