3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variables = array( "firstname" => "Sachin", "lastname" => "Tendulkar", "course" => array( 0 => "PHP", 1 => "HTML", 2 => "CSS", 3 => "Javascript" ) ); $courses = implode(', ', $variables['course']); // point it directly on the desired array echo $courses; // PHP, HTML, CSS, Javascript
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bmdJH
function name:  (null)
number of ops:  9
compiled vars:  !0 = $variables, !1 = $courses
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        FETCH_DIM_R                                      ~3      !0, 'course'
          4        SEND_VAL                                                 ~3
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   14     7        ECHO                                                     !1
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.08 ms | 1398 KiB | 15 Q