3v4l.org

run code in 500+ 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:  49
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ASSERT_CHECK                                                 
          1        INIT_FCALL                                                   'assert'
          2        FRAMELESS_ICALL_2                str_contains        ~0      'Ahoy+World%21', 'Ahoy'
          3        TYPE_CHECK                                        8  ~1      ~0
          4        SEND_VAL                                                     ~1
          5        SEND_VAL                                                     'assert%28str_contains%28%27Ahoy+World%21%27%2C+%27Ahoy%27%29+%3D%3D%3D+true%29'
          6        DO_ICALL                                                     
    6     7        ASSERT_CHECK                                                 
          8        INIT_FCALL                                                   'assert'
          9        FRAMELESS_ICALL_2                str_contains        ~3      'Ahoy+World%21', 'Hello'
         10        TYPE_CHECK                                        4  ~4      ~3
         11        SEND_VAL                                                     ~4
         12        SEND_VAL                                                     'assert%28str_contains%28%27Ahoy+World%21%27%2C+%27Hello%27%29+%3D%3D%3D+false%29'
         13        DO_ICALL                                                     
    8    14        ASSERT_CHECK                                                 
         15        INIT_FCALL                                                   'assert'
         16        FRAMELESS_ICALL_2                str_starts_with      ~6      'Ahoy+World%21', 'Ahoy'
         17        TYPE_CHECK                                        8  ~7      ~6
         18        SEND_VAL                                                     ~7
         19        SEND_VAL                                                     'assert%28str_starts_with%28%27Ahoy+World%21%27%2C+%27Ahoy%27%29+%3D%3D%3D+true%29'
         20        DO_ICALL                                                     
    9    21        ASSERT_CHECK                                                 
         22        INIT_FCALL                                                   'assert'
         23        FRAMELESS_ICALL_2                str_starts_with      ~9      'AhoyWorld', 'Hello'
         24        TYPE_CHECK                                        4  ~10     ~9
         25        SEND_VAL                                                     ~10
         26        SEND_VAL                                                     'assert%28str_starts_with%28%27AhoyWorld%27%2C+%27Hello%27%29+%3D%3D%3D+false%29'
         27        DO_ICALL                                                     
   11    28        ASSERT_CHECK                                                 
         29        INIT_FCALL                                                   'assert'
         30        INIT_FCALL                                                   'str_ends_with'
         31        SEND_VAL                                                     'Ahoy+World%21'
         32        SEND_VAL                                                     'World%21'
         33        DO_ICALL                                             $12     
         34        TYPE_CHECK                                        8  ~13     $12
         35        SEND_VAL                                                     ~13
         36        SEND_VAL                                                     'assert%28str_ends_with%28%27Ahoy+World%21%27%2C+%27World%21%27%29+%3D%3D%3D+true%29'
         37        DO_ICALL                                                     
   12    38        ASSERT_CHECK                                                 
         39        INIT_FCALL                                                   'assert'
         40        INIT_FCALL                                                   'str_ends_with'
         41        SEND_VAL                                                     'Ahoy+World%21'
         42        SEND_VAL                                                     'Ahoy'
         43        DO_ICALL                                             $15     
         44        TYPE_CHECK                                        4  ~16     $15
         45        SEND_VAL                                                     ~16
         46        SEND_VAL                                                     'assert%28str_ends_with%28%27Ahoy+World%21%27%2C+%27Ahoy%27%29+%3D%3D%3D+false%29'
         47        DO_ICALL                                                     
         48      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.2 ms | 2103 KiB | 15 Q