Created
September 2, 2014 20:02
-
-
Save joubertredrat/66916cfd5fe6a2320f24 to your computer and use it in GitHub Desktop.
Um simples conceito para debate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// como é atualmente | |
$a = ['um', 'dois', 'tres', 'quatro']; | |
echo implode (',', $a); | |
// Conceito 1 | |
// $params = new paramClass(); | |
$params = new stdClass(); | |
$params->glue = ','; | |
$params->pieces = ['um', 'dois', 'tres', 'quatro']; | |
echo implode ($params); | |
// Conceito 2 | |
$params['glue'] = ','; | |
$params['pieces'] = ['um', 'dois', 'tres', 'quatro']; | |
echo implode ($params); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment