3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $source_code = "\nprint('Hello\nTest 123\nWorld')\n"; $source_code = "x=input()\nprint('Hello\nWorld')\n"; $match = preg_match('/(["\'])(.*)\1/s', $source_code, $matches); if ($match) { $text = $matches[2]; $text = str_replace("\n", '\\\\n', $text); $source_code = preg_replace('/(.*)((["\']).*\3)(.*)/s', '$1$3' . addslashes($text) . '$3$4', $source_code); } var_dump($source_code);

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.5.10.0070.01116.91
8.5.00.0130.01120.29
8.4.150.0020.00014.05
8.4.140.0100.01117.81
8.4.130.0120.01017.75
8.4.120.0070.00420.39
8.4.110.0100.01022.70
8.4.100.0110.00818.10
8.4.90.0130.00817.91
8.4.80.0120.00818.02
8.4.70.0090.00620.57
8.4.60.0050.00419.03
8.4.50.0140.00724.33
8.4.40.0040.01217.96
8.4.30.0160.00318.91
8.4.20.0150.00619.69
8.4.10.0090.00021.57
8.3.280.0150.00618.74
8.3.270.0110.00816.64
8.3.260.0070.00816.64
8.3.250.0100.00818.84
8.3.240.0100.00916.56
8.3.230.0120.00716.75
8.3.220.0060.00416.79
8.3.210.0120.00718.60
8.3.200.0030.00616.76
8.3.190.0100.00717.22
8.3.180.0130.00818.38
8.3.170.0040.01117.41
8.3.160.0100.01018.78
8.3.150.0040.01419.16
8.3.140.0030.00616.71
8.3.130.0070.01116.49
8.3.120.0050.00520.77
8.3.110.0060.00316.91
8.3.100.0160.00318.63
8.3.90.0040.00426.77
8.3.80.0030.00616.63
8.3.70.0100.00618.68
8.3.60.0120.00918.55
8.3.50.0100.01025.48
8.3.40.0070.01118.96
8.3.30.0060.00918.96
8.3.20.0060.00324.18
8.3.10.0050.00324.66
8.3.00.0000.00826.16
8.2.290.0080.00320.79
8.2.280.0080.00818.57
8.2.270.0040.01117.26
8.2.260.0040.00416.64
8.2.250.0040.00416.99
8.2.240.0060.00317.13
8.2.230.0030.00620.94
8.2.220.0080.00024.06
8.2.210.0050.00326.77
8.2.200.0090.00016.75
8.2.190.0120.00316.60
8.2.180.0080.00825.92
8.2.170.0110.00719.11
8.2.160.0090.01222.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00926.35
8.2.110.0060.00322.32
8.2.100.0100.00318.13
8.2.90.0060.00318.16
8.2.80.0080.00018.16
8.2.70.0090.00018.16
8.2.60.0030.00718.28
8.2.50.0040.00418.10
8.2.40.0050.00319.42
8.2.30.0040.00419.41
8.2.20.0000.00718.07
8.2.10.0040.00419.31
8.2.00.0050.00319.37
8.1.330.0120.00722.08
8.1.320.0100.00916.13
8.1.310.0090.00016.89
8.1.300.0030.00618.54
8.1.290.0000.01030.84
8.1.280.0040.01125.92
8.1.270.0130.00623.99
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0030.01017.60
8.1.230.0120.00021.04
8.1.220.0040.00417.74
8.1.210.0040.00418.91
8.1.200.0060.00317.48
8.1.190.0060.00317.48
8.1.180.0060.00318.10
8.1.170.0030.00618.54
8.1.160.0000.01118.98
8.1.150.0080.00018.98
8.1.140.0030.00620.81
8.1.130.0000.00720.02
8.1.120.0060.00617.64
8.1.110.0050.00317.44
8.1.100.0040.00417.50
8.1.90.0040.00417.63
8.1.80.0030.00517.56
8.1.70.0030.00317.58
8.1.60.0050.00317.62
8.1.50.0030.00617.70
8.1.40.0050.00317.55
8.1.30.0000.00817.75
8.1.20.0000.00817.86
8.1.10.0000.00717.59
8.1.00.0050.00317.52
8.0.300.0070.00019.78
8.0.290.0120.00016.75
8.0.280.0070.00018.39
8.0.270.0040.00417.03
8.0.260.0060.00020.22
8.0.250.0000.00717.11
8.0.240.0030.00317.02
8.0.230.0040.00417.01
8.0.220.0000.00717.15
8.0.210.0070.00017.05
8.0.200.0040.00417.08
8.0.190.0070.00017.14
8.0.180.0080.00017.07
8.0.170.0030.00617.04
8.0.160.0000.00817.07
8.0.150.0000.00716.81
8.0.140.0030.00617.02
8.0.130.0030.00313.47
8.0.120.0030.00616.95
8.0.110.0040.00417.05
8.0.100.0000.00716.96
8.0.90.0070.00017.05
8.0.80.0070.01017.01
8.0.70.0040.00417.00
8.0.60.0040.00416.96
8.0.50.0000.00816.85
8.0.30.0090.01517.33
8.0.20.0140.00517.28
8.0.10.0000.00816.95
8.0.00.0130.00716.81
7.4.330.0050.00015.55
7.4.320.0000.00716.74
7.4.300.0030.00316.63
7.4.290.0030.00316.71
7.4.280.0040.00716.62
7.4.270.0040.00416.71
7.4.260.0050.00013.38
7.4.250.0040.00416.75
7.4.240.0000.00716.77
7.4.230.0080.00016.91
7.4.220.0030.00316.79
7.4.210.0080.01016.70
7.4.200.0000.00716.80
7.4.130.0100.00916.66
7.4.120.0090.00916.55
7.4.110.0130.00416.76
7.4.100.0090.00916.71
7.4.90.0060.01216.70
7.4.80.0080.01316.82
7.4.70.0100.00916.74
7.4.60.0080.00916.85
7.4.50.0080.01016.72
7.4.40.0110.00816.64
7.4.30.0060.01516.64
7.4.20.0140.00416.53
7.4.10.0140.00716.62
7.4.00.0090.01316.65
7.3.330.0050.00316.39
7.3.320.0030.00313.24
7.3.310.0030.00316.41
7.3.300.0070.00016.29
7.3.290.0080.00716.38
7.3.260.0080.01016.56
7.3.230.0100.01116.73
7.3.210.0110.00716.42
7.3.200.0130.00816.54
7.3.190.0100.00816.38
7.3.180.0090.00916.48
7.3.170.0080.01216.66
7.3.160.0070.01416.53
7.3.150.0140.00716.48
7.3.140.0050.01416.53
7.3.130.0100.01016.54
7.3.120.0110.01116.42
7.3.110.0120.00616.37
7.3.100.0060.01416.41
7.3.90.0090.00916.50
7.3.80.0100.01316.45
7.3.70.0130.00716.56
7.3.60.0110.00716.51
7.3.50.0160.00716.53
7.3.40.0100.01016.52
7.3.30.0080.01216.53
7.3.20.0150.00716.28
7.3.10.0080.01216.47
7.3.00.0090.01216.53
7.2.330.0110.00716.70
7.2.320.0100.01016.63
7.2.310.0080.01216.66
7.2.300.0110.00716.76
7.2.290.0120.01216.69
7.2.280.0110.00916.77
7.2.270.0140.00916.81
7.2.260.0110.00816.77
7.2.250.0130.01016.68
7.2.240.0100.01116.70
7.2.230.0200.01116.73
7.2.220.0080.01416.72
7.2.210.0080.01416.79
7.2.200.0170.00516.66
7.2.190.0160.00816.67
7.2.180.0090.01116.78
7.2.170.0070.01416.72
7.2.160.0090.01216.73
7.2.150.0070.01816.81
7.2.140.0120.00716.84
7.2.130.0070.01516.87
7.2.120.0130.01016.68
7.2.110.0190.00516.91
7.2.100.0060.01716.67
7.2.90.0090.01716.78
7.2.80.0100.01516.73
7.2.70.0170.00716.84
7.2.60.0150.01316.88
7.2.50.0110.01116.82
7.2.40.0110.01416.84
7.2.30.0130.01116.73
7.2.20.0090.01216.69
7.2.10.0130.01216.76
7.2.00.0110.00816.73

preferences:
169.18 ms | 403 KiB | 5 Q