3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matches = []; $utc_offset = preg_match( '/-?\d+/', 'UTC-01', $matches ) ? preg_replace( '/(?<=^|[-+])0*/', '', $matches[ 0 ] ) : 0; echo $utc_offset;

preferences:
55.22 ms | 402 KiB | 5 Q