3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ '12, 34, 56', '233, 0, 0, 1', '99, 68, 135', '0, 0, 0, 0.31', ]; foreach ($tests as $test) { unset($r, $g, $b, $a); sscanf($test, '%d,%d,%d,%f', $r, $g, $b, $a); var_dump($r, $g, $b, $a); echo "\n"; }
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
int(12) int(34) int(56) NULL int(233) int(0) int(0) float(1) int(99) int(68) int(135) NULL int(0) int(0) int(0) float(0.31)

preferences:
55.93 ms | 402 KiB | 62 Q