3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "On first glance, the following appears to output 'true' "; print_r(substr($string, "true")); print_r(stristr($string, " ' ")); print_r(substr($string, strpos($string, " ' ")+1, 4)); print_r(substr($string, strpos($string, " ' "), 4));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T5W2P
function name:  (null)
number of ops:  41
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'On+first+glance%2C+the+following+appears+to+output+%27true%27+'
    5     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'true'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'stristr'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 '+%27+'
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'print_r'
         16        INIT_FCALL                                               'substr'
         17        SEND_VAR                                                 !0
         18        INIT_FCALL                                               'strpos'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 '+%27+'
         21        DO_ICALL                                         $6      
         22        ADD                                              ~7      $6, 1
         23        SEND_VAL                                                 ~7
         24        SEND_VAL                                                 4
         25        DO_ICALL                                         $8      
         26        SEND_VAR                                                 $8
         27        DO_ICALL                                                 
    8    28        INIT_FCALL                                               'print_r'
         29        INIT_FCALL                                               'substr'
         30        SEND_VAR                                                 !0
         31        INIT_FCALL                                               'strpos'
         32        SEND_VAR                                                 !0
         33        SEND_VAL                                                 '+%27+'
         34        DO_ICALL                                         $10     
         35        SEND_VAR                                                 $10
         36        SEND_VAL                                                 4
         37        DO_ICALL                                         $11     
         38        SEND_VAR                                                 $11
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.58 ms | 1396 KiB | 21 Q