3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function DDBwrite($table, $items) { global $aws, $DDB; if (!isset($DDB)) $DDB = $aws->get('dynamodb'); foreach ($items as $key => $value) { if( $value==null || $value=="") { unset ($items[$key]); continue; } $type="N"; if(is_string($value)) $type="S"; $items[$key] = array($type=>$value); } return $DDB->putItem(array( "TableName" => $table, "Item" => $items))->toArray(); }
Output for 5.0.0 - 7.1.0
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/CQhOl on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/CQhOl on line 16
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/CQhOl on line 16
Process exited with code 255.