3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'a,b,c,d,e'; echo implode( ',', explode( ',', $str, substr_count( $str, ',') - 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AfWj2
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a%2Cb%2Cc%2Cd%2Ce'
    3     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%2C'
          5        SEND_VAR                                                 !0
          6        INIT_FCALL                                               'substr_count'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '%2C'
          9        DO_ICALL                                         $2      
         10        SUB                                              ~3      $2, 1
         11        SEND_VAL                                                 ~3
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                         $5      
         15        ECHO                                                     $5
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.05 ms | 1394 KiB | 19 Q