3v4l.org

run code in 300+ PHP versions simultaneously
<?php function charge(int $amount) { // charge customer for $amount; printf('charged customer %d for the product', $amount); } $amount = '400'; // $database->select('price')->from('products', 'p')->where('p.id = ?')->execute($productId); // .... charge((int) $amout);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Warning: Undefined variable $amout in /in/anriQ on line 14 charged customer 0 for the product
Output for 7.4.0 - 7.4.33
Notice: Undefined variable: amout in /in/anriQ on line 14 charged customer 0 for the product

preferences:
88.9 ms | 1249 KiB | 4 Q