<?php
$cars = array
(
array("Volvo",22,18),
array("BMW",15,13),
array("Saab",5,2),
array("Land Rover",17,15)
);
// Produce: You should eat pizza, beer, and ice cream every day
$phrase = "You should eat fruits, vegetables, and fiber every day.";
$healthy = array("fruits", "vegetables", "fiber");
$yummy = array("pizza", "beer", "ice cream");
$newphrase = str_replace($healthy, $yummy, $phrase);
$vevo = '02/09/2016';
echo $vevo;
print_r($vevo);
$date = new DateTime($vevo);
echo $date->format('Y-m-d');
var_dump($cars);
var_dump($newphrase);
?>
- Output for 5.6.0 - 5.6.25, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- 02/09/201602/09/20162016-02-09array(4) {
[0]=>
array(3) {
[0]=>
string(5) "Volvo"
[1]=>
int(22)
[2]=>
int(18)
}
[1]=>
array(3) {
[0]=>
string(3) "BMW"
[1]=>
int(15)
[2]=>
int(13)
}
[2]=>
array(3) {
[0]=>
string(4) "Saab"
[1]=>
int(5)
[2]=>
int(2)
}
[3]=>
array(3) {
[0]=>
string(10) "Land Rover"
[1]=>
int(17)
[2]=>
int(15)
}
}
string(52) "You should eat pizza, beer, and ice cream every day."
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
02/09/201602/09/20162016-02-09array(4) {
[0]=>
array(3) {
[0]=>
string(5) "Volvo"
[1]=>
int(22)
[2]=>
int(18)
}
[1]=>
array(3) {
[0]=>
string(3) "BMW"
[1]=>
int(15)
[2]=>
int(13)
}
[2]=>
array(3) {
[0]=>
string(4) "Saab"
[1]=>
int(5)
[2]=>
int(2)
}
[3]=>
array(3) {
[0]=>
string(10) "Land Rover"
[1]=>
int(17)
[2]=>
int(15)
}
}
string(52) "You should eat pizza, beer, and ice cream every day."
preferences:
239.52 ms | 403 KiB | 199 Q