3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ '$hey()', '$hey->hi()', '$hey(\'hi\')', '$hey moretext()' ]; foreach ($strings as $string) { if (preg_match('~^\$\w+\([^)]*)$~', $string)) { echo $string . "\n"; } }

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.60.0120.00318.42
8.3.50.0120.00316.43
8.3.40.0070.00718.88
8.3.30.0070.00718.66
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.180.0110.01125.92
8.2.170.0110.00719.09
8.2.160.0090.00622.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0040.00420.53
8.2.100.0040.00717.84
8.2.90.0040.00417.75
8.2.80.0080.00018.78
8.2.70.0000.00817.59
8.2.60.0060.00317.92
8.2.50.0080.00018.05
8.2.40.0000.00718.16
8.2.30.0000.00818.07
8.2.20.0040.00417.96
8.2.10.0070.00419.22
8.2.00.0070.00019.14
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0030.00328.09
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0060.00620.84
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0000.00817.35
8.1.190.0030.00517.23
8.1.180.0060.00318.10
8.1.170.0080.00018.50
8.1.160.0030.00718.98
8.1.150.0030.00618.81
8.1.140.0000.00818.84
8.1.130.0000.00720.14
8.1.120.0030.00317.42
8.1.110.0040.00417.46
8.1.100.0070.00017.35
8.1.90.0000.00817.38
8.1.80.0000.00917.44
8.1.70.0000.00717.46
8.1.60.0060.00317.54
8.1.50.0080.00017.50
8.1.40.0100.00017.41
8.1.30.0050.00517.56
8.1.20.0070.00017.64
8.1.10.0040.00417.43
8.1.00.0040.00417.37
8.0.300.0080.00018.77
8.0.290.0000.00916.75
8.0.280.0050.00318.44
8.0.270.0050.00318.07
8.0.260.0030.00318.41
8.0.250.0000.00817.02
8.0.240.0040.00416.88
8.0.230.0000.00717.02
8.0.220.0030.00317.01
8.0.210.0000.00717.03
8.0.200.0000.00716.91
8.0.190.0070.00016.90
8.0.180.0000.00717.02
8.0.170.0060.00316.98
8.0.160.0040.00416.97
8.0.150.0000.00716.77
8.0.140.0000.00716.80
8.0.130.0030.00313.38
8.0.120.0090.00016.84
8.0.110.0030.00417.01
8.0.100.0040.00416.97
8.0.90.0040.00417.06
8.0.80.0050.01116.88
8.0.70.0040.00416.73
8.0.60.0080.00017.07
8.0.50.0000.00716.83
8.0.30.0030.01316.91
8.0.20.0060.01616.98
8.0.10.0080.00817.04
8.0.00.0060.01616.99
7.4.330.0020.00215.55
7.4.320.0000.00616.67
7.4.300.0060.00016.55
7.4.290.0000.00716.50
7.4.280.0000.00816.57
7.4.270.0040.00416.64
7.4.260.0050.00013.25
7.4.250.0020.00516.52
7.4.240.0070.00016.63
7.4.230.0000.00816.75
7.4.220.0020.00516.76
7.4.210.0100.00616.65
7.4.200.0070.00016.48
7.4.160.0040.01116.67
7.4.150.0140.00716.66
7.4.140.0090.01016.42
7.4.130.0090.00616.41
7.4.120.0060.01316.61
7.4.110.0130.00316.40
7.4.100.0120.00616.68
7.4.90.0120.00916.59
7.4.80.0070.01016.43
7.4.70.0090.00616.49
7.4.60.0120.00316.52
7.4.50.0040.01716.41
7.4.40.0050.00716.48
7.4.30.0110.01116.48
7.4.20.0060.01216.41
7.4.10.0160.00616.46
7.4.00.0030.01316.44
7.3.330.0030.00316.44
7.3.320.0030.00313.15
7.3.310.0070.00016.47
7.3.300.0040.00416.42
7.3.290.0060.01016.38
7.3.270.0080.00816.44
7.3.260.0170.00316.32
7.3.250.0060.01416.48
7.3.240.0000.02116.40
7.3.230.0060.01516.35
7.3.220.0160.00616.25
7.3.210.0030.01716.24
7.3.200.0100.00716.20
7.3.190.0120.00316.28
7.3.180.0040.01116.35
7.3.170.0080.01116.21
7.3.160.0090.00616.23
7.3.150.0070.01316.30
7.3.140.0030.01316.24
7.3.130.0070.01016.24
7.3.120.0120.00316.28
7.3.110.0150.00616.16
7.3.100.0120.00316.24
7.3.90.0110.00816.51
7.3.80.0100.01016.30
7.3.70.0030.01816.46
7.3.60.0070.01416.38
7.3.50.0120.00916.46
7.3.40.0100.01316.41
7.3.30.0030.01316.39
7.3.20.0100.00716.43
7.3.10.0070.01016.35
7.3.00.0070.01016.41

preferences:
59.33 ms | 400 KiB | 5 Q