3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function validateStringArray(string ...$strings) {} function validateIntArray(int ...$strings) {} function processStringArray(array $strings) { try { validateStringArray(...$strings); } catch (Error $error) { throw new Exception("only arrays of strings are allowed"); } } function processIntArray(array $arr) { try { validateIntArray(...$arr); } catch (Error $error) { throw new Exception("only arrays of ints are allowed"); } } //processStringArray(['abc', 'eef', 'a']); processIntArray([12,3,4,1.2]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCV5I
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'processintarray'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function validatestringarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCV5I
function name:  validateStringArray
number of ops:  2
compiled vars:  !0 = $strings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_VARIADIC                                    !0      
          1      > RETURN                                                   null

End of function validatestringarray

Function validateintarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCV5I
function name:  validateIntArray
number of ops:  2
compiled vars:  !0 = $strings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_VARIADIC                                    !0      
          1      > RETURN                                                   null

End of function validateintarray

Function processstringarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/lCV5I
function name:  processStringArray
number of ops:  12
compiled vars:  !0 = $strings, !1 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'validatestringarray'
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      1          
          5      > JMP                                                      ->11
   10     6  E > > CATCH                                       last         'Error'
   11     7    >   NEW                                              $3      'Exception'
          8        SEND_VAL_EX                                              'only+arrays+of+strings+are+allowed'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $3
   13    11    > > RETURN                                                   null

End of function processstringarray

Function processintarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/lCV5I
function name:  processIntArray
number of ops:  12
compiled vars:  !0 = $arr, !1 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        INIT_FCALL                                               'validateintarray'
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      1          
          5      > JMP                                                      ->11
   18     6  E > > CATCH                                       last         'Error'
   19     7    >   NEW                                              $3      'Exception'
          8        SEND_VAL_EX                                              'only+arrays+of+ints+are+allowed'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $3
   21    11    > > RETURN                                                   null

End of function processintarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.83 ms | 1403 KiB | 16 Q