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
/** | |
* Standard class | |
*/ | |
class Car { | |
// Public properties are not widely supported yet | |
// https://caniuse.com/#feat=mdn-javascript_classes_public_class_fields | |
// Our constructor | |
constructor(brand, model) { | |
// Define two public properties inside the ctor |
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
$aTest = array( | |
5 => array('pseudo' => 'donald'), | |
200 => array('pseudo' => 'mickey') | |
); | |
echo 'Before script'; | |
var_dump($aTest); | |
foreach ($aTest as $iId => &$aData) | |
$aData['test'] = $iId; |