3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); assert(str_contains('Ahoy World!', 'Ahoy') === true); assert(str_contains('Ahoy World!', 'Hello') === false); assert(str_starts_with('Ahoy World!', 'Ahoy') === true); assert(str_starts_with('AhoyWorld', 'Hello') === false); assert(str_ends_with('Ahoy World!', 'World!') === true); assert(str_ends_with('Ahoy World!', 'Ahoy') === false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cgeR4
function name:  (null)
number of ops:  61
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSERT_CHECK                                             
          1        INIT_FCALL                                               'assert'
          2        INIT_FCALL                                               'str_contains'
          3        SEND_VAL                                                 'Ahoy+World%21'
          4        SEND_VAL                                                 'Ahoy'
          5        DO_ICALL                                         $0      
          6        TYPE_CHECK                                    8  ~1      $0
          7        SEND_VAL                                                 ~1
          8        SEND_VAL                                                 'assert%28str_contains%28%27Ahoy+World%21%27%2C+%27Ahoy%27%29+%3D%3D%3D+true%29'
          9        DO_ICALL                                                 
    6    10        ASSERT_CHECK                                             
         11        INIT_FCALL                                               'assert'
         12        INIT_FCALL                                               'str_contains'
         13        SEND_VAL                                                 'Ahoy+World%21'
         14        SEND_VAL                                                 'Hello'
         15        DO_ICALL                                         $3      
         16        TYPE_CHECK                                    4  ~4      $3
         17        SEND_VAL                                                 ~4
         18        SEND_VAL                                                 'assert%28str_contains%28%27Ahoy+World%21%27%2C+%27Hello%27%29+%3D%3D%3D+false%29'
         19        DO_ICALL                                                 
    8    20        ASSERT_CHECK                                             
         21        INIT_FCALL                                               'assert'
         22        INIT_FCALL                                               'str_starts_with'
         23        SEND_VAL                                                 'Ahoy+World%21'
         24        SEND_VAL                                                 'Ahoy'
         25        DO_ICALL                                         $6      
         26        TYPE_CHECK                                    8  ~7      $6
         27        SEND_VAL                                                 ~7
         28        SEND_VAL                                                 'assert%28str_starts_with%28%27Ahoy+World%21%27%2C+%27Ahoy%27%29+%3D%3D%3D+true%29'
         29        DO_ICALL                                                 
    9    30        ASSERT_CHECK                                             
         31        INIT_FCALL                                               'assert'
         32        INIT_FCALL                                               'str_starts_with'
         33        SEND_VAL                                                 'AhoyWorld'
         34        SEND_VAL                                                 'Hello'
         35        DO_ICALL                                         $9      
         36        TYPE_CHECK                                    4  ~10     $9
         37        SEND_VAL                                                 ~10
         38        SEND_VAL                                                 'assert%28str_starts_with%28%27AhoyWorld%27%2C+%27Hello%27%29+%3D%3D%3D+false%29'
         39        DO_ICALL                                                 
   11    40        ASSERT_CHECK                                             
         41        INIT_FCALL                                               'assert'
         42        INIT_FCALL                                               'str_ends_with'
         43        SEND_VAL                                                 'Ahoy+World%21'
         44        SEND_VAL                                                 'World%21'
         45        DO_ICALL                                         $12     
         46        TYPE_CHECK                                    8  ~13     $12
         47        SEND_VAL                                                 ~13
         48        SEND_VAL                                                 'assert%28str_ends_with%28%27Ahoy+World%21%27%2C+%27World%21%27%29+%3D%3D%3D+true%29'
         49        DO_ICALL                                                 
   12    50        ASSERT_CHECK                                             
         51        INIT_FCALL                                               'assert'
         52        INIT_FCALL                                               'str_ends_with'
         53        SEND_VAL                                                 'Ahoy+World%21'
         54        SEND_VAL                                                 'Ahoy'
         55        DO_ICALL                                         $15     
         56        TYPE_CHECK                                    4  ~16     $15
         57        SEND_VAL                                                 ~16
         58        SEND_VAL                                                 'assert%28str_ends_with%28%27Ahoy+World%21%27%2C+%27Ahoy%27%29+%3D%3D%3D+false%29'
         59        DO_ICALL                                                 
         60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.26 ms | 1400 KiB | 21 Q