3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); var_dump(str_replace('a', 'b', null)); var_dump(str_replace('a', 'b', 123)); var_dump(str_replace('a', 'b', "test")); var_dump(str_replace('a', 'b', false));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YOktG
function name:  (null)
number of ops:  33
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'a'
          3        SEND_VAL                                                 'b'
          4        SEND_VAL                                                 null
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 'a'
         11        SEND_VAL                                                 'b'
         12        SEND_VAL                                                 123
         13        DO_ICALL                                         $2      
         14        SEND_VAR                                                 $2
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'str_replace'
         18        SEND_VAL                                                 'a'
         19        SEND_VAL                                                 'b'
         20        SEND_VAL                                                 'test'
         21        DO_ICALL                                         $4      
         22        SEND_VAR                                                 $4
         23        DO_ICALL                                                 
    8    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'str_replace'
         26        SEND_VAL                                                 'a'
         27        SEND_VAL                                                 'b'
         28        SEND_VAL                                                 <false>
         29        DO_ICALL                                         $6      
         30        SEND_VAR                                                 $6
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.28 ms | 1014 KiB | 15 Q