3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = ' * * * *String'; $a = ltrim($string, ' *'); var_dump($a); $b = preg_replace('/^\s?\*/', '', $string); var_dump($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pl3uD
function name:  (null)
number of ops:  16
compiled vars:  !0 = $string, !1 = $a, !2 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '+%2A+%2A+%2A+%2AString'
    4     1        INIT_FCALL                                                   'ltrim'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     '+%2A'
          4        DO_ICALL                                             $4      
          5        ASSIGN                                                       !1, $4
    5     6        INIT_FCALL                                                   'var_dump'
          7        SEND_VAR                                                     !1
          8        DO_ICALL                                                     
    7     9        FRAMELESS_ICALL_3                preg_replace        ~7      '%2F%5E%5Cs%3F%5C%2A%2F', ''
         10        OP_DATA                                                      !0
         11        ASSIGN                                                       !2, ~7
    8    12        INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !2
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.86 ms | 2209 KiB | 15 Q