3v4l.org

run code in 500+ PHP versions simultaneously
<?php function test(int $test) { echo $test . "\n"; } //test('test'); // type error //test('123test'); // type error test(123.00); test(123.123); // deprecation warning test(true); test(false); //test(null); // type error test(123); //test([1]); // type error
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kZ09l
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                                   'test'
          1        SEND_VAL                                                     123
          2        DO_FCALL                                          0          
   10     3        INIT_FCALL                                                   'test'
          4        SEND_VAL                                                     123.123
          5        DO_FCALL                                          0          
   11     6        INIT_FCALL                                                   'test'
          7        SEND_VAL                                                     <true>
          8        DO_FCALL                                          0          
   12     9        INIT_FCALL                                                   'test'
         10        SEND_VAL                                                     <false>
         11        DO_FCALL                                          0          
   14    12        INIT_FCALL                                                   'test'
         13        SEND_VAL                                                     123
         14        DO_FCALL                                          0          
   15    15      > RETURN                                                       1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kZ09l
function name:  test
number of ops:  4
compiled vars:  !0 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        CONCAT                                               ~1      !0, '%0A'
          2        ECHO                                                         ~1
    5     3      > RETURN                                                       null

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.06 ms | 1599 KiB | 18 Q