3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data="musisz odpowiedziec w ciagu 280 sekund: 88+67=?musisz odpowiedziec w ciagu 280 sekund: 88+67=?musisz odpowiedziec w ciagu 280 sekund: 88+67=?"; $rret = preg_match('/((\d+)(\+|\-|\*)(\d+))\s*\=\s*\?/', $data, $matches); if ($rret !== 1) { throw new \LogicException("ERROR: COULD NOT EXTRACT MATH QUESTION!"); } $left = (int)$matches[2]; $operator = $matches[3]; $right = (int)$matches[4]; $answer = null; switch ($operator) { case "+": { $answer = $left + $right; break; } case "*": { $answer = $left * $right; break; } case "-": { $answer = $left - $right; break; } default: { throw new \LogicException("UNKNOWN OPERATOR: {$operator}"); } } echo "question parsed: answer: \"{$answer}\" left: \"{$left}\" operator: \"{$operator}\" right: \"{$right}\"\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.0090.00918.31
8.3.50.0120.00618.28
8.3.40.0060.01319.01
8.3.30.0040.01118.96
8.3.20.0040.00420.64
8.3.10.0080.00023.48
8.3.00.0080.00022.58
8.2.180.0060.00918.70
8.2.170.0090.00622.96
8.2.160.0100.00722.03
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00420.07
8.2.120.0080.00026.35
8.2.110.0090.00020.98
8.2.100.0040.00818.03
8.2.90.0000.00818.16
8.2.80.0000.00918.16
8.2.70.0040.00417.75
8.2.60.0040.00417.75
8.2.50.0030.00618.10
8.2.40.0040.00419.65
8.2.30.0040.00419.51
8.2.20.0000.00718.17
8.2.10.0050.00319.46
8.2.00.0000.00818.14
8.1.280.0100.01025.92
8.1.270.0090.00020.24
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00322.64
8.1.230.0060.00622.68
8.1.220.0030.00617.78
8.1.210.0080.00018.77
8.1.200.0040.00417.25
8.1.190.0060.00317.36
8.1.180.0060.00318.10
8.1.170.0060.00318.59
8.1.160.0050.00318.91
8.1.150.0090.00018.88
8.1.140.0040.00422.25
8.1.130.0040.00417.69
8.1.120.0040.00717.57
8.1.110.0000.00717.60
8.1.100.0040.00417.51
8.1.90.0040.00417.56
8.1.80.0080.00017.57
8.1.70.0000.00817.66
8.1.60.0040.00417.77
8.1.50.0040.00417.71
8.1.40.0060.00317.75
8.1.30.0080.00017.84
8.1.20.0000.01117.80
8.1.10.0030.00617.65
8.1.00.0080.00017.63
8.0.300.0060.00320.07
8.0.290.0000.00817.00
8.0.280.0050.00318.34
8.0.270.0020.00517.21
8.0.260.0000.00716.99
8.0.250.0050.00317.07
8.0.240.0040.00417.04
8.0.230.0050.00317.05
8.0.220.0050.00217.00
8.0.210.0000.00817.08
8.0.200.0040.00417.11
8.0.190.0040.00417.12
8.0.180.0030.00617.10
8.0.170.0050.00317.07
8.0.160.0040.00417.05
8.0.150.0040.00417.04
8.0.140.0000.00916.93
8.0.130.0000.00513.50
8.0.120.0070.00017.08
8.0.110.0040.00416.91
8.0.100.0040.00416.94
8.0.90.0000.00716.89
8.0.80.0070.00717.07
8.0.70.0040.00417.06
8.0.60.0070.00016.92
8.0.50.0000.00816.86
8.0.30.0110.01017.46
8.0.20.0130.00717.32
8.0.10.0000.00717.18
8.0.00.0110.00816.99
7.4.330.0000.00516.74
7.4.320.0040.00416.83
7.4.300.0000.00616.74
7.4.290.0070.00016.84
7.4.280.0040.00416.69
7.4.270.0070.00016.73
7.4.260.0070.00016.63
7.4.250.0030.00316.69
7.4.240.0000.00716.81
7.4.230.0000.00716.82
7.4.220.0030.00516.83
7.4.210.0100.00616.88
7.4.200.0040.00416.95
7.4.160.0100.00716.79
7.4.140.0080.01417.86
7.4.130.0100.00716.57
7.4.120.0090.00916.79
7.4.110.0100.00716.74
7.4.100.0100.01316.62
7.4.90.0090.00916.70
7.4.80.0100.00719.39
7.4.70.0100.00616.89
7.4.60.0130.00316.77
7.4.50.0030.01316.75
7.4.40.0140.00316.62
7.3.330.0000.00613.31
7.3.320.0060.00013.40
7.3.310.0030.00316.55
7.3.300.0000.00716.43
7.3.290.0110.00316.51
7.3.280.0090.00816.39
7.3.260.0120.01416.63
7.3.240.0070.01016.79
7.3.230.0070.01016.57
7.3.210.0090.00616.78
7.3.200.0070.01016.57
7.3.190.0160.00316.93
7.3.180.0080.00816.69
7.3.170.0130.00316.71
7.3.160.0050.01116.51
7.3.30.0110.00614.92
7.3.20.0460.00714.89
7.3.10.0560.00314.93
7.3.00.0470.00714.98
7.2.330.0200.00316.67
7.2.320.0140.01116.71
7.2.310.0100.00716.74
7.2.300.0090.00616.86
7.2.290.0180.00416.72
7.2.160.0000.01314.91
7.2.150.0560.01115.25
7.2.140.0550.00715.26
7.2.130.0530.00314.90
7.2.120.0520.01715.17
7.2.110.0560.01415.18
7.2.100.0560.01015.15
7.2.90.0680.00315.27
7.2.80.0640.00615.38
7.2.70.0580.00315.02
7.2.60.0720.00615.10
7.2.50.0730.00715.18
7.2.40.0590.01015.11
7.2.30.0580.01115.12
7.2.20.0400.01015.19
7.2.10.0580.00315.22
7.2.00.0540.00015.02
7.1.270.0480.01014.20
7.1.260.0540.00314.24
7.1.250.0510.00614.14

preferences:
68.17 ms | 404 KiB | 6 Q