3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = '---12323123123---'; echo trim($str, '-'); echo "\n"; echo rtrim($str, '-'); echo "\n"; echo ltrim($str, '-'); echo "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UUcjO
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '---12323123123---'
    4     1        FRAMELESS_ICALL_2                trim                ~2      !0, '-'
          2        ECHO                                                         ~2
    5     3        ECHO                                                         '%0A'
    6     4        INIT_FCALL                                                   'rtrim'
          5        SEND_VAR                                                     !0
          6        SEND_VAL                                                     '-'
          7        DO_ICALL                                             $3      
          8        ECHO                                                         $3
    7     9        ECHO                                                         '%0A'
    8    10        INIT_FCALL                                                   'ltrim'
         11        SEND_VAR                                                     !0
         12        SEND_VAL                                                     '-'
         13        DO_ICALL                                             $4      
         14        ECHO                                                         $4
    9    15        ECHO                                                         '%0A'
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.31 ms | 2273 KiB | 10 Q