3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = '(-6.268649975971238, 106.69106266990389),(-6.267711482694832, 106.72625325217928),(-6.288272630052733, 106.72736905112947),(-6.288699201273463, 106.69106266990389)'; foreach(explode('),(',trim($value,'()')) as $single_array){ list ($x, $y) = explode(',',$single_array); $polygon[] = array((double)$x, (double)$y); } var_export($polygon);
Output for 8.5.0
Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in /in/C2ksu on line 7 Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in /in/C2ksu on line 7 array ( 0 => array ( 0 => -6.268649975971238, 1 => 106.69106266990389, ), 1 => array ( 0 => -6.267711482694832, 1 => 106.72625325217928, ), 2 => array ( 0 => -6.288272630052733, 1 => 106.72736905112947, ), 3 => array ( 0 => -6.288699201273463, 1 => 106.69106266990389, ), )
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 7.1.25 - 7.1.33, 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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14
array ( 0 => array ( 0 => -6.268649975971238, 1 => 106.69106266990389, ), 1 => array ( 0 => -6.267711482694832, 1 => 106.72625325217928, ), 2 => array ( 0 => -6.288272630052733, 1 => 106.72736905112947, ), 3 => array ( 0 => -6.288699201273463, 1 => 106.69106266990389, ), )

preferences:
183.62 ms | 412 KiB | 5 Q