3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Raphaƫl said you aren't coming home."; function isValidLength($text, $length) { return $length <= preg_match_all("~[\pL\pM'-]+~u", $text); } var_export( [ 5 => isValidLength($text, 5), 6 => isValidLength($text, 6), 7 => isValidLength($text, 7), ] );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mIdBV
function name:  (null)
number of ops:  20
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Rapha%C3%ABl+said+you+aren%27t+coming+home.'
    9     1        INIT_FCALL                                               'var_export'
   11     2        INIT_FCALL                                               'isvalidlength'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 5
          5        DO_FCALL                                      0  $2      
          6        INIT_ARRAY                                       ~3      $2, 5
   12     7        INIT_FCALL                                               'isvalidlength'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 6
         10        DO_FCALL                                      0  $4      
         11        ADD_ARRAY_ELEMENT                                ~3      $4, 6
   13    12        INIT_FCALL                                               'isvalidlength'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 7
         15        DO_FCALL                                      0  $5      
         16        ADD_ARRAY_ELEMENT                                ~3      $5, 7
         17        SEND_VAL                                                 ~3
         18        DO_ICALL                                                 
   15    19      > RETURN                                                   1

Function isvalidlength:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mIdBV
function name:  isValidLength
number of ops:  9
compiled vars:  !0 = $text, !1 = $length
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%7E%5B%5CpL%5CpM%27-%5D%2B%7Eu'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        IS_SMALLER_OR_EQUAL                              ~3      !1, $2
          7      > RETURN                                                   ~3
    7     8*     > RETURN                                                   null

End of function isvalidlength

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.42 ms | 1399 KiB | 20 Q