3v4l.org

run code in 300+ PHP versions simultaneously
<?php function v2($value) { return preg_replace_callback('/([A-Z])/', function($char) { return '_'.strtolower($char[1]); }, lcfirst($value)); } for($x = 0; $x < 10000; $x++){ $foo = v2('foo_bar_baz_bee'); echo $foo; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.70.0140.01116.63
8.3.60.0140.00316.59
8.3.50.0150.01017.55
8.3.40.0140.01418.96
8.3.30.0200.00718.63
8.3.20.0160.00318.93
8.3.10.0100.00020.83
8.3.00.0060.00619.51
8.2.180.0140.00318.30
8.2.170.0160.01019.01
8.2.160.0170.00722.96
8.2.150.0060.00324.18
8.2.140.0090.00024.66
8.2.130.0030.00626.16
8.2.120.0060.00320.79
8.2.110.0070.00721.01
8.2.100.0100.00317.91
8.2.90.0100.00019.42
8.2.80.0030.01019.38
8.2.70.0000.01017.75
8.2.60.0030.00617.80
8.2.50.0060.00318.07
8.2.40.0030.00618.00
8.2.30.0000.00818.02
8.2.20.0000.01019.54
8.2.10.0030.00617.86
8.2.00.0060.00617.84
8.1.280.0110.00725.92
8.1.270.0110.00024.66
8.1.260.0030.00726.35
8.1.250.0040.01528.09
8.1.240.0110.00022.48
8.1.230.0070.00721.10
8.1.220.0030.00717.78
8.1.210.0060.00319.10
8.1.200.0060.00317.35
8.1.190.0030.00617.39
8.1.180.0090.00018.10
8.1.170.0030.00618.85
8.1.160.0000.00818.97
8.1.150.0030.00518.86
8.1.140.0060.00317.67
8.1.130.0090.00017.72
8.1.120.0030.00917.62
8.1.110.0040.00417.57
8.1.100.0060.00317.63
8.1.90.0040.00417.67
8.1.80.0040.00417.73
8.1.70.0030.00617.60
8.1.60.0000.00917.79
8.1.50.0030.00617.58
8.1.40.0040.00417.77
8.1.30.0060.00317.79
8.1.20.0040.00417.80
8.1.10.0040.00417.72
8.1.00.0070.00317.70
8.0.300.0000.00919.68
8.0.290.0040.00416.75
8.0.280.0030.00518.41
8.0.270.0050.00317.09
8.0.260.0080.00016.89
8.0.250.0030.00717.02
8.0.240.0000.00817.02
8.0.230.0040.00416.99
8.0.220.0080.00016.98
8.0.210.0080.00016.82
8.0.200.0030.00616.89
8.0.190.0030.00617.05
8.0.180.0060.00316.95
8.0.170.0070.00316.97
8.0.160.0030.00616.95
8.0.150.0090.00016.90
8.0.140.0000.00916.99
8.0.130.0090.00013.40
8.0.120.0050.00316.96
8.0.110.0060.00316.81
8.0.100.0040.00416.91
8.0.90.0030.00616.77
8.0.80.0000.02116.96
8.0.70.0030.00616.81
8.0.60.0080.00016.79
8.0.50.0030.00616.92
8.0.30.0220.01417.06
8.0.20.0200.01516.88
8.0.10.0040.00417.09
8.0.00.0200.01416.82
7.4.330.0000.00613.20
7.4.320.0050.00316.48
7.4.300.0000.00816.57
7.4.290.0000.00816.54
7.4.280.0030.00616.57
7.4.270.0080.00016.50
7.4.260.0070.00013.54
7.4.250.0070.00316.56
7.4.240.0040.00416.67
7.4.230.0040.00416.45
7.4.220.0160.01016.73
7.4.210.0100.01116.60
7.4.200.0050.00316.57
7.4.190.0060.00316.81
7.4.160.0310.01216.61
7.4.150.0130.01316.63
7.4.140.0210.01316.56
7.4.130.0130.01416.68
7.4.120.0220.00816.52
7.4.110.0130.01616.71
7.4.100.0110.01716.76
7.4.90.0240.01016.67
7.4.80.0160.00719.39
7.4.70.0130.01316.65
7.4.60.0160.00616.59
7.4.50.0320.00016.40
7.4.40.0100.01116.43
7.4.30.0140.01116.69
7.4.00.0040.01615.13
7.3.330.0070.00013.41
7.3.320.0060.00313.30
7.3.310.0040.00416.43
7.3.300.0000.00816.34
7.3.290.0040.01616.39
7.3.280.0130.01216.37
7.3.270.0240.00616.42
7.3.260.0120.01516.63
7.3.250.0140.02116.59
7.3.240.0220.01316.61
7.3.230.0110.01716.68
7.3.210.0180.01516.68
7.3.200.0090.01516.41
7.3.190.0160.01616.55
7.3.180.0090.01916.74
7.3.170.0120.01516.61
7.3.160.0150.01116.33
7.3.120.0000.01915.00
7.2.330.0150.01816.80
7.2.320.0230.01316.77
7.2.310.0200.01516.84
7.2.300.0070.02116.78
7.2.290.0000.02416.79
7.2.60.0030.01616.90
7.1.200.0030.01016.14
7.1.70.0000.00917.29
7.1.60.0190.00619.40
7.1.50.0140.01117.27
7.0.200.0070.00417.05

preferences:
43 ms | 401 KiB | 5 Q