3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array('potato', 'salad', 'salad_rel'); $start_time = microtime(TRUE); for ($i = 0; $i < 100000; $i++){ foreach ($test as $string){ substr($string, -4) == '_rel'; } } $end_time = microtime(TRUE); echo $end_time - $start_time . PHP_EOL; $start_time = microtime(TRUE); for ($i = 0; $i < 100000; $i++){ foreach ($test as $string){ preg_match('#.{1,}_rel$#', $string); } } $end_time = microtime(TRUE); echo $end_time - $start_time . PHP_EOL;

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)
7.4.00.0100.09315.04
7.3.120.0070.10115.37
7.3.110.0100.10114.66
7.3.100.0030.06615.38
7.3.90.0070.06415.00
7.3.80.0030.06314.99
7.3.70.0100.06415.07
7.3.60.0060.07215.03
7.3.50.0000.06614.88
7.3.40.0070.06415.07
7.3.30.0000.07215.04
7.3.20.0060.05816.95
7.3.10.0030.06616.91
7.3.00.0030.07616.86
7.2.250.0030.09615.33
7.2.240.0130.11115.28
7.2.230.0060.08115.31
7.2.220.0130.07415.30
7.2.210.0030.07715.39
7.2.200.0100.07515.21
7.2.190.0070.07515.05
7.2.180.0100.08115.18
7.2.170.0100.08315.34
7.2.160.0100.09415.06
7.2.150.0130.07716.98
7.2.140.0070.07717.18
7.2.130.0030.08017.04
7.2.120.0000.08216.83
7.2.110.0030.07817.00
7.2.100.0070.07217.10
7.2.90.0130.06817.20
7.2.80.0030.08017.00
7.2.70.0030.07817.07
7.2.60.0070.07617.14
7.2.50.0030.08716.93
7.2.40.0000.08117.20
7.2.30.0070.07217.08
7.2.20.0070.07716.91
7.2.10.0100.08417.20
7.2.00.0100.07318.53
7.1.330.0070.12016.06
7.1.320.0030.12815.94
7.1.310.0130.10815.94
7.1.300.0030.11716.14
7.1.290.0070.14516.01
7.1.280.0030.11916.02
7.1.270.0000.11916.01
7.1.260.0100.13315.99
7.1.250.0030.12516.05
7.1.70.0030.07117.49
7.1.60.0130.10319.32
7.1.50.0170.09617.31
7.1.00.0100.14722.32
7.0.200.0660.06215.09
7.0.140.0070.14322.01
7.0.110.0030.09319.96
7.0.100.0030.16020.04
7.0.90.0070.08319.93
7.0.80.0170.08719.93
7.0.70.0070.07719.87
7.0.60.0230.08320.05
7.0.50.0030.11719.97
7.0.40.0130.08319.68
7.0.30.0030.09319.75
7.0.20.0170.08019.74
7.0.10.0030.09019.70
7.0.00.0000.12019.78
5.6.280.0030.30021.12
5.6.260.0070.22020.60
5.6.250.0130.20320.67
5.6.240.0030.25320.70
5.6.230.0070.23320.71
5.6.220.0000.19720.66
5.6.210.0000.19720.81
5.6.200.0070.24020.63
5.6.190.0070.26720.46
5.6.180.0000.22020.56
5.6.170.0100.26320.69
5.6.160.0070.22720.55
5.6.150.0030.29020.63
5.6.140.0070.20720.46
5.6.130.0030.27320.58
5.6.120.0030.25720.63
5.6.110.0070.27320.84
5.6.100.0030.21320.66
5.6.90.0130.27320.63
5.6.80.0100.23320.04
5.6.70.0000.22720.02
5.6.60.0030.21020.05
5.6.50.0000.22319.98
5.6.40.0030.28720.00
5.6.30.0030.21320.00
5.6.20.0070.22020.00
5.6.10.0100.24320.05
5.6.00.0030.19319.98
5.5.380.0100.21317.58
5.5.370.0030.20017.63
5.5.360.0030.23317.60
5.5.350.0070.24317.75
5.5.340.0030.27717.77
5.5.330.0070.25717.86
5.5.320.0130.21318.16
5.5.310.0000.21718.02
5.5.300.0030.19717.84
5.5.290.0000.25717.86
5.5.280.0070.21318.09
5.5.270.0100.28018.11
5.5.260.0030.27318.09
5.5.250.0100.32317.72
5.5.240.0030.27317.52
5.5.230.0030.22317.24
5.5.220.0100.26017.38
5.5.210.0030.22017.54
5.5.200.0100.24717.20
5.5.190.0000.21717.33
5.5.180.0030.24017.47
5.5.160.0070.19017.51
5.5.150.0070.23717.25
5.5.140.0000.22717.47
5.5.130.0300.17317.45
5.5.120.0030.23317.19
5.5.110.0000.19317.44
5.5.100.0070.22717.26
5.5.90.0070.21717.52
5.5.80.0000.21317.38
5.5.70.0000.19017.50
5.5.60.0000.20317.40
5.5.50.0030.17317.13
5.5.40.0100.20317.26
5.5.30.0000.20317.37
5.5.20.0030.17317.30
5.5.10.0030.17317.10
5.5.00.0000.20017.39
5.4.450.0070.18319.44
5.4.440.0030.22319.25
5.4.430.0100.25019.43
5.4.420.0030.23019.25
5.4.410.0070.18019.47
5.4.400.0070.22319.03
5.4.390.0100.26319.18
5.4.380.0030.24319.27
5.4.370.0070.25319.12
5.4.360.0030.22019.19
5.4.350.0000.23018.93
5.4.340.0100.27019.02
5.4.320.0070.18318.98
5.4.310.0030.18318.95
5.4.300.0070.18319.25
5.4.290.0030.29319.11
5.4.280.0100.18319.25
5.4.270.0000.25719.10
5.4.260.0030.21318.90
5.4.250.0030.23319.00
5.4.240.0030.19318.92
5.4.230.0000.18319.17
5.4.220.0000.23018.97
5.4.210.0000.20718.92
5.4.200.0030.22019.17
5.4.190.0000.17319.26
5.4.180.0030.17019.12
5.4.170.0030.19718.99
5.4.160.0030.19719.24
5.4.150.0070.16719.10
5.4.140.0000.19316.27
5.4.130.0000.17316.34
5.4.120.0100.24316.48
5.4.110.0070.22716.50
5.4.100.0000.28716.38
5.4.90.0070.20316.40
5.4.80.0070.25316.37
5.4.70.0000.20716.35
5.4.60.0070.24016.16
5.4.50.0000.23716.25
5.4.40.0030.26716.31
5.4.30.0100.24316.15
5.4.20.0070.21716.49
5.4.10.0030.22016.45
5.4.00.0030.22015.80
5.3.290.0030.24014.77
5.3.280.0000.21714.53
5.3.270.0000.20014.54
5.3.260.0030.18014.39
5.3.250.0030.20014.41
5.3.240.0000.21314.55
5.3.230.0100.24714.38
5.3.220.0100.23714.41
5.3.210.0030.23714.64
5.3.200.0030.22014.50
5.3.190.0100.28314.41
5.3.180.0030.23314.64
5.3.170.0030.29314.48
5.3.160.0070.31314.44
5.3.150.0030.23714.57
5.3.140.0000.22714.65
5.3.130.0000.22314.48
5.3.120.0070.29014.62
5.3.110.0030.25714.47
5.3.100.0130.24014.13
5.3.90.0270.23714.08
5.3.80.0000.23313.86
5.3.70.0030.23313.84
5.3.60.0030.25013.79
5.3.50.0100.27014.01
5.3.40.0030.28713.79
5.3.30.0100.30013.84
5.3.20.0000.23713.55
5.3.10.0100.21713.59
5.3.00.0030.23013.57
5.2.170.0000.25712.35
5.2.160.0000.26712.35
5.2.150.0070.22712.35
5.2.140.0070.25012.35
5.2.130.0000.20712.35
5.2.120.0000.23012.35
5.2.110.0000.23712.35
5.2.100.0030.26312.35
5.2.90.0100.21312.35
5.2.80.0030.25012.35
5.2.70.0000.21012.35
5.2.60.0070.26712.35
5.2.50.0030.22312.35
5.2.40.0070.24012.35
5.2.30.0000.23012.35
5.2.20.0000.21712.35
5.2.10.0030.20312.35
5.2.00.0130.24312.35
5.1.60.0030.21012.35
5.1.50.0000.27012.35
5.1.40.0000.18312.35
5.1.30.0000.17312.35
5.1.20.0070.27312.35
5.1.10.0130.22712.35
5.1.00.0000.25012.35
5.0.50.0000.31712.35
5.0.40.0030.27012.35
5.0.30.0030.26712.35
5.0.20.0000.34012.35
5.0.10.0030.25312.35
5.0.00.0000.28712.35
4.4.90.0030.26012.35
4.4.80.0000.24712.35
4.4.70.0030.24012.35
4.4.60.0070.25312.35
4.4.50.0000.29712.35
4.4.40.0000.22312.35
4.4.30.0300.25012.35
4.4.20.0000.27012.35
4.4.10.0000.21712.35
4.4.00.0000.30712.35
4.3.110.0070.23312.35
4.3.100.0000.26312.35
4.3.90.0000.27312.35
4.3.80.0000.29012.35
4.3.70.0400.30312.35
4.3.60.0030.25712.35
4.3.50.0000.29012.35
4.3.40.0000.25312.35
4.3.30.0000.26012.35
4.3.20.0000.26012.35
4.3.10.0000.28312.35
4.3.00.0000.24312.35

preferences:
40.99 ms | 401 KiB | 5 Q