3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'my_name_is_John_Doe', 'my_name_is john doe', 'my_name_is_john_doe', 'i_am_20_years_old', "i'm_cool!" ]; foreach ($strings as $string) { echo json_encode([ $string, !strlen(ltrim($string, 'a..z_')), !preg_match('/[a-z_]*[^a-z_]/', $string) ]); echo "\n\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 23
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/JdgIn
function name:  (null)
number of ops:  25
compiled vars:  !0 = $strings, !1 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $3      !0, ->23
          2    > > FE_FETCH_R                                               $3, !1, ->23
   12     3    >   INIT_FCALL                                               'json_encode'
   13     4        INIT_ARRAY                                       ~4      !1
   14     5        INIT_FCALL                                               'ltrim'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 'a..z_'
          8        DO_ICALL                                         $5      
          9        STRLEN                                           ~6      $5
         10        BOOL_NOT                                         ~7      ~6
         11        ADD_ARRAY_ELEMENT                                ~4      ~7
   15    12        INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%2F%5Ba-z_%5D%2A%5B%5Ea-z_%5D%2F'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        BOOL_NOT                                         ~9      $8
         17        ADD_ARRAY_ELEMENT                                ~4      ~9
         18        SEND_VAL                                                 ~4
   12    19        DO_ICALL                                         $10     
   15    20        ECHO                                                     $10
   17    21        ECHO                                                     '%0A%0A'
   11    22      > JMP                                                      ->2
         23    >   FE_FREE                                                  $3
   18    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.35 ms | 1439 KiB | 16 Q