Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Test join() function : basic functionality --FILE-- <?php echo "*** Testing join(..

Decoded Output download

*** Testing join() : basic functionality ***

Did this file decode correctly?

Original Code

--TEST--
Test join() function : basic functionality
--FILE--
<?php
echo "*** Testing join() : basic functionality ***\n";

// Initialize all required variables
$glue = ',';
$pieces = array(1, 2, 3, 4);

// pieces as array with numeric values
var_dump( join($glue, $pieces) );

// pieces as array with strings values
$glue = ", "; // multiple car as glue
$pieces = array("Red", "Green", "Blue", "Black", "White");
var_dump( join($glue, $pieces) );

// pieces as associative array (numeric values)
$pieces = array("Hour" => 10, "Minute" => 20, "Second" => 40);
$glue = ':';
var_dump( join($glue, $pieces) );

// pieces as associative array (string/numeric values)
$pieces = array("Day" => 'Friday', "Month" => "September", "Year" => 2007);
$glue = '/';
var_dump( join($glue, $pieces) );

echo "Done\n";
?>
--EXPECT--
*** Testing join() : basic functionality ***
string(7) "1,2,3,4"
string(30) "Red, Green, Blue, Black, White"
string(8) "10:20:40"
string(21) "Friday/September/2007"
Done

Function Calls

join 1

Variables

$glue ,
$pieces [{'key': 0, 'value': 1}, {'key': 1, 'value': 2}, {'key': 2, 'value': 3}, {'key': 3, 'value': 4}]

Stats

MD5 c467a6877f2d5cdf477b42ef73cdc1f1
Eval Count 0
Decode Time 117 ms