3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phpExpression = '1 if true else 2 '; while (preg_match('/(.*?)\s*if\s*(.*?)\s*else\s*(.*)/', $phpExpression, $match)){ var_dump( $phpExpression); $phpExpression = str_replace($match[0],'(('.$match[2].')?('.$match[1].'):('.$match[3].'))',$phpExpression); } var_dump( $phpExpression);

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.0100.00917.06
8.5.00.0160.00620.36
8.4.160.0140.00723.66
8.4.150.0010.00114.05
8.4.140.0150.00617.96
8.4.130.0120.00918.04
8.4.120.0050.00520.55
8.4.110.0040.00522.68
8.4.100.0050.00517.98
8.4.90.0130.00817.94
8.4.80.0030.00518.07
8.4.70.0160.00517.91
8.4.60.0110.00818.63
8.4.50.0090.00718.18
8.4.40.0100.01018.73
8.4.30.0120.00318.64
8.4.20.0120.00919.69
8.4.10.0030.00619.52
8.3.280.0110.00920.42
8.3.270.0120.00716.63
8.3.260.0090.01016.97
8.3.250.0080.01118.81
8.3.240.0150.00416.82
8.3.230.0080.01116.62
8.3.220.0090.00517.41
8.3.210.0090.01016.67
8.3.200.0100.01016.74
8.3.190.0120.00716.78
8.3.180.0140.00416.73
8.3.170.0040.00418.84
8.3.160.0090.01017.13
8.3.150.0080.00018.75
8.3.140.0040.01416.63
8.3.130.0080.00016.91
8.3.120.0030.00620.86
8.3.110.0000.00916.78
8.3.100.0040.00418.36
8.3.90.0110.00726.77
8.3.80.0040.00418.17
8.3.70.0110.00418.43
8.3.60.0040.01118.43
8.3.50.0040.01116.69
8.3.40.0100.01321.85
8.3.30.0160.00619.17
8.3.20.0070.01421.81
8.3.10.0120.00921.54
8.3.00.0110.01119.05
8.2.290.0060.01220.53
8.2.280.0100.00718.78
8.2.270.0130.00617.14
8.2.260.0070.01116.61
8.2.250.0030.00516.73
8.2.240.0110.00716.91
8.2.230.0080.00020.94
8.2.220.0060.00324.06
8.2.210.0040.01526.77
8.2.200.0030.00616.75
8.2.190.0090.00616.88
8.2.180.0140.00316.63
8.2.170.0160.00719.07
8.2.160.0130.00320.05
8.2.150.0070.01419.13
8.2.140.0140.00720.40
8.2.130.0030.01720.31
8.2.120.0110.01119.36
8.2.110.0170.00319.38
8.2.100.0120.00919.35
8.2.90.0180.00419.08
8.2.80.0140.00719.01
8.2.70.0130.00718.88
8.2.60.0180.00019.27
8.2.50.0110.00719.27
8.2.40.0180.00018.98
8.2.30.0070.01118.79
8.2.20.0130.00618.78
8.2.10.0110.00718.78
8.2.00.0120.00620.74
8.1.330.0120.00716.93
8.1.320.0120.00816.40
8.1.310.0060.00318.43
8.1.300.0030.00716.86
8.1.290.0060.00330.84
8.1.280.0120.00325.92
8.1.270.0140.00423.91
8.1.260.0170.00323.79
8.1.250.0030.01623.83
8.1.240.0070.01020.53
8.1.230.0120.00620.42
8.1.220.0070.01020.80
8.1.210.0100.00720.32
8.1.200.0060.01320.50
8.1.190.0070.01320.58
8.1.180.0110.00420.16
8.1.170.0090.00618.71
8.1.160.0060.00918.64
8.1.150.0040.01118.91
8.1.140.0110.00418.77
8.1.130.0110.00418.81
8.1.120.0090.00618.78
8.1.110.0080.00818.75
8.1.100.0030.01319.86
8.1.90.0140.00418.75
8.1.80.0100.00619.89
8.1.70.0120.00620.62
8.1.60.0110.00720.64
8.1.50.0130.00620.54
8.1.40.0140.00418.83
8.1.30.0060.01218.94
8.1.20.0040.01220.11
8.1.10.0060.01218.79
8.1.00.0110.00418.66

preferences:
64.44 ms | 403 KiB | 5 Q