3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'a, modern php framework.= is a must 1234'; $output = preg_replace('/[^a-zA-z\d]/', '_', $value); $put = preg_replace('/_*/', '_', $output); echo $put;
Output for 7.0.20, 7.3.24 - 7.3.33, 7.4.12 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
_a__m_o_d_e_r_n__p_h_p__f_r_a_m_e_w_o_r_k__i_s__a__m_u_s_t__1_2_3_4_
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 _a__m_o_d_e_r_n__p_h_p__f_r_a_m_e_w_o_r_k__i_s__a__m_u_s_t__1_2_3_4_

preferences:
117.67 ms | 402 KiB | 119 Q