3v4l.org

run code in 300+ PHP versions simultaneously
<?php $option = 'maxFileSize'; preg_match_all( '#((?:^|[A-Z])[a-z]+)#', $option, $matches ); if ( isset( $matches[1] ) && strlen( strtolower( implode( '_', $matches[1] ) ) ) >= strlen( $option ) ) { $option = strtolower( implode( '_', $matches[1] ) ); } var_dump( $option );

preferences:
44.79 ms | 402 KiB | 5 Q