3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '((\'rats\' + \'stoats\') - 800 / 2)'; $tokens = token_get_all("<?php $input ?>"); $expr = ''; foreach($tokens as $token){ if(is_string($token)){ if(in_array($token, array('(', ')', '+', '-', '/', '*'), true)){ $expr .= $token; print "\n symbol: " . $expr; } continue; } list($id, $text) = $token; if(in_array($id, array(T_DNUMBER, T_LNUMBER,T_CONSTANT_ENCAPSED_STRING))){ $expr .= $text; print "\n number: " . $expr; } } eval("\$result = {$expr};"); print "\nexpr = " . $expr; print "\nres = " . $result;

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.0180.00016.88
8.3.50.0080.01117.44
8.3.40.0090.00918.85
8.3.30.0130.00618.79
8.3.20.0080.00018.89
8.3.10.0080.00020.70
8.3.00.0040.00417.36
8.2.180.0070.01416.75
8.2.170.0120.00422.96
8.2.160.0070.00722.16
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00019.95
8.2.110.0030.00620.90
8.2.100.0080.00317.91
8.2.90.0000.00819.46
8.2.80.0040.00419.20
8.2.70.0040.00417.63
8.2.60.0000.00917.80
8.2.50.0040.00418.07
8.2.40.0040.00420.01
8.2.30.0040.00418.13
8.2.20.0000.00817.86
8.2.10.0070.00317.84
8.2.00.0060.00317.88
8.1.280.0090.00625.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.55
8.1.230.0080.00420.93
8.1.220.0050.00317.77
8.1.210.0090.00018.97
8.1.200.0030.00617.35
8.1.190.0060.00317.51
8.1.180.0080.00018.10
8.1.170.0000.00818.74
8.1.160.0000.00818.84
8.1.150.0040.00418.66
8.1.140.0000.00717.35
8.1.130.0070.00017.76
8.1.120.0070.00017.51
8.1.110.0000.00817.44
8.1.100.0050.00217.48
8.1.90.0040.00417.54
8.1.80.0000.00717.41
8.1.70.0000.00717.36
8.1.60.0040.00417.57
8.1.50.0030.00617.43
8.1.40.0080.00017.44
8.1.30.0000.00817.67
8.1.20.0040.00417.64
8.1.10.0000.00817.48
8.1.00.0030.00717.59
8.0.300.0040.00419.89
8.0.290.0040.00416.88
8.0.280.0000.00718.49
8.0.270.0040.00417.16
8.0.260.0030.00316.83
8.0.250.0040.00417.01
8.0.240.0000.01116.98
8.0.230.0000.00717.05
8.0.220.0050.00316.88
8.0.210.0070.00016.86
8.0.200.0000.00717.07
8.0.190.0000.00716.97
8.0.180.0000.00717.05
8.0.170.0090.00016.88
8.0.160.0070.00017.00
8.0.150.0030.00616.99
8.0.140.0080.00316.97
8.0.130.0090.00013.45
8.0.120.0070.00016.84
8.0.110.0000.00717.04
8.0.100.0050.00216.79
8.0.90.0040.00417.03
8.0.80.0140.00717.04
8.0.70.0000.00816.89
8.0.60.0000.00716.86
8.0.50.0040.00416.87
8.0.30.0090.01017.10
8.0.20.0090.01317.08
8.0.10.0000.00716.98
8.0.00.0110.00716.57
7.4.330.0000.00513.00
7.4.320.0030.00316.68
7.4.300.0000.00716.52
7.4.290.0020.00516.55
7.4.280.0030.00716.39
7.4.270.0030.00316.59
7.4.260.0060.00013.40
7.4.250.0000.00916.42
7.4.240.0070.00016.47
7.4.230.0000.00716.71
7.4.220.0070.01716.46
7.4.210.0050.01216.57
7.4.200.0070.00016.56
7.4.190.0000.00716.67
7.4.160.0110.01116.77
7.4.150.0150.00316.54
7.4.140.0100.01216.62
7.4.130.0120.00616.59
7.4.120.0120.00716.47
7.4.110.0060.01216.62
7.4.100.0090.00916.54
7.4.90.0170.00716.73
7.4.80.0150.00316.61
7.4.70.0110.00516.34
7.4.60.0090.00616.50
7.4.50.0000.00816.53
7.4.40.0090.00616.42
7.4.30.0120.00616.53
7.4.00.0070.00714.81
7.3.330.0000.00613.22
7.3.320.0030.00313.30
7.3.310.0000.00716.43
7.3.300.0000.00716.43
7.3.290.0090.00616.44
7.3.280.0070.00816.41
7.3.270.0100.00616.71
7.3.260.0070.01116.43
7.3.250.0080.01316.59
7.3.240.0060.01216.52
7.3.230.0060.01116.57
7.3.210.0100.00716.70
7.3.200.0110.00819.39
7.3.190.0080.01216.42
7.3.180.0090.00916.40
7.3.170.0170.00016.61
7.3.160.0120.00416.47
7.3.120.0100.01014.95
7.3.110.0080.00614.79
7.3.100.0030.01215.15
7.3.90.0060.00615.06
7.3.80.0060.00615.15
7.3.70.0040.00714.79
7.3.60.0090.00314.81
7.3.50.0070.00714.96
7.3.40.0070.00714.79
7.3.30.0040.00414.97
7.3.20.0060.00316.68
7.3.10.0080.00816.89
7.3.00.0030.01216.83
7.2.330.0090.00916.68
7.2.320.0030.01316.40
7.2.310.0160.00616.42
7.2.300.0100.00816.75
7.2.290.0110.00516.56
7.2.240.0070.01014.79
7.2.230.0040.01215.04
7.2.220.0040.01115.30
7.2.210.0060.00914.98
7.2.200.0090.00015.00
7.2.190.0060.00915.07
7.2.180.0110.00415.12
7.2.170.0050.00814.96
7.2.160.0100.00715.18
7.2.150.0000.01616.91
7.2.140.0100.00616.95
7.2.130.0090.00616.88
7.2.120.0030.00617.02
7.2.110.0040.00416.61
7.2.100.0040.01116.95
7.2.90.0310.00915.94
7.2.80.0190.01016.00
7.2.70.0340.00915.81
7.2.60.0260.00916.26
7.2.50.0130.01116.14
7.2.40.0390.01416.13
7.2.30.0320.00715.94
7.2.20.0480.00815.90
7.2.10.0110.00715.76
7.2.00.0380.00817.10
7.1.330.0060.01215.53
7.1.320.0030.01315.94
7.1.310.0030.01315.91
7.1.300.0060.00915.88
7.1.290.0030.01016.05
7.1.280.0070.00715.74
7.1.270.0060.01015.85
7.1.260.0070.00715.64
7.1.250.0070.00715.79
7.1.210.0830.00314.00
7.1.200.0030.01614.00
7.1.190.0580.00813.63
7.1.180.0600.00313.69
7.1.170.0920.01213.80
7.1.160.0740.01513.80
7.1.150.0180.00613.57
7.1.140.0810.00313.73
7.1.130.0820.00613.94
7.1.120.0670.00613.84
7.1.110.1820.01414.17
7.1.100.0390.00416.10
7.1.90.0840.01314.21
7.1.80.0790.01414.08
7.1.70.0180.00715.59
7.1.60.0590.01225.70
7.1.50.0640.01333.41
7.1.40.0630.00931.71
7.1.30.0860.01531.95
7.1.20.0950.01231.97
7.1.10.0200.00513.88
7.1.00.0200.03218.05
7.0.310.1430.01213.60
7.0.300.0360.00013.35
7.0.290.0750.01013.16
7.0.280.0310.00713.34
7.0.270.0570.01413.71
7.0.260.0970.01113.66
7.0.250.0700.00313.68
7.0.240.0570.00613.63
7.0.230.0720.00313.73
7.0.220.0900.00813.58
7.0.210.0090.00913.36
7.0.200.0030.00815.04
7.0.190.0070.01113.68
7.0.180.0690.00613.70
7.0.170.0310.00613.57
7.0.160.0090.01413.59
7.0.150.0460.01013.73
7.0.140.0160.04017.71
7.0.130.0710.00913.67
7.0.120.0100.03817.76
7.0.110.0980.00613.31
7.0.100.0810.00413.45
7.0.90.0170.01113.32
7.0.80.0200.00913.80
7.0.70.0220.00513.46
7.0.60.0260.03516.53
7.0.50.0150.02215.84
7.0.40.0570.04816.82
7.0.30.0720.03816.92
7.0.20.0380.03016.92
7.0.10.0220.02516.82
7.0.00.0810.04516.71
5.6.300.0130.00314.05
5.6.290.0140.00514.54
5.6.280.0030.04117.56
5.6.270.0080.01014.13
5.6.260.0090.00714.64
5.6.250.0070.01114.24
5.6.240.0150.00314.27
5.6.230.0100.00714.25
5.6.220.0080.00814.16
5.6.210.0090.04217.56
5.6.200.0050.02716.11
5.6.190.0100.04617.22
5.6.180.0230.04117.41
5.6.170.0150.04517.36
5.6.160.0080.04417.25
5.6.150.0120.02816.17
5.6.140.0100.04016.32
5.6.130.0090.02516.18
5.6.120.0100.04317.71
5.6.110.0130.02017.54
5.6.100.0070.03717.64
5.6.90.0070.02517.61
5.6.80.0050.04017.35
5.6.70.2290.02317.36
5.6.60.0140.00314.27
5.6.50.0140.00314.35
5.6.40.0170.00014.20
5.6.30.0050.01114.33
5.6.20.0140.00514.27
5.6.10.0120.00414.02
5.6.00.0070.01014.36
5.5.380.0020.01310.93
5.5.370.0090.00611.09
5.5.360.0080.00511.02
5.5.350.0190.04115.80
5.5.340.0080.01814.48
5.5.330.0080.02215.56
5.5.320.0060.03015.50
5.5.310.0190.04415.80
5.5.300.0110.03514.40
5.5.290.0030.04814.58
5.5.280.0080.03016.05
5.5.270.0110.04315.86
5.5.260.0030.03315.88
5.5.250.0090.01915.78
5.5.240.0110.04015.52
5.5.230.0130.00010.85
5.5.220.0090.00310.88
5.5.210.0050.00810.80
5.5.200.0000.01010.82
5.5.190.0070.00710.95
5.5.180.0000.01210.92
5.5.170.0060.00913.88
5.5.160.0050.00510.65
5.5.150.0090.00410.76
5.5.140.0100.00510.85
5.5.130.0050.00810.92
5.5.120.0000.01610.86
5.5.110.0070.00710.97
5.5.100.0140.00011.03
5.5.90.0060.00611.00
5.5.80.0030.01010.93
5.5.70.0110.00011.15
5.5.60.0100.00410.99
5.5.50.0070.00711.04
5.5.40.0070.00611.04
5.5.30.0050.00911.07
5.5.20.0080.00410.99
5.5.10.0070.00210.82
5.5.00.0090.00510.87
5.4.450.0060.03715.22
5.4.440.0040.03815.15
5.4.430.0050.04315.18
5.4.420.0060.02515.22
5.4.410.0100.03715.17
5.4.400.0080.03014.90
5.4.390.0120.03514.77
5.4.380.0100.01915.01
5.4.370.0100.02714.93
5.4.360.0080.04015.06
5.4.350.0070.02615.04
5.4.340.0100.01815.04
5.4.330.0020.00710.86
5.4.320.0120.03514.95
5.4.310.0060.04415.05
5.4.300.0060.02714.93
5.4.290.0040.02515.04
5.4.280.0070.02714.85
5.4.270.0130.02014.84
5.4.260.0080.04015.01
5.4.250.0020.03514.74
5.4.240.0040.02414.99
5.4.230.0110.03314.91
5.4.220.0040.04214.87
5.4.210.0030.03514.94
5.4.200.0070.04214.94
5.4.190.0080.04014.75
5.4.180.0050.02214.96
5.4.170.0080.03814.78
5.4.160.0050.02814.87
5.4.150.0140.03514.89
5.4.140.0120.03313.57
5.4.130.0050.03913.52
5.4.120.0030.03713.60
5.4.110.0030.02813.53
5.4.100.0030.03613.63
5.4.90.0090.01713.54
5.4.80.0090.03713.77
5.4.70.0080.03513.60
5.4.60.0130.03313.62
5.4.50.0030.03113.62
5.4.40.0100.03413.66
5.4.30.0090.03813.64
5.4.20.0080.04013.56
5.4.10.0070.02513.51
5.4.00.0080.03613.38
5.3.290.0090.03512.57
5.3.280.0060.04312.46
5.3.270.0090.03812.56
5.3.260.0040.02712.54
5.3.250.0070.04012.49
5.3.240.0070.03912.45
5.3.230.0050.04312.54
5.3.220.0070.02512.43
5.3.210.0090.04012.48
5.3.200.0030.03712.43
5.3.190.0040.04212.48
5.3.180.0130.03612.56
5.3.170.0070.04012.52
5.3.160.0070.03912.46
5.3.150.0050.04112.54
5.3.140.0070.03812.63
5.3.130.0050.03212.50
5.3.120.0070.03812.50
5.3.110.0090.04012.52
5.3.100.0030.04412.15
5.3.90.0050.03912.23
5.3.80.0080.03812.22
5.3.70.0080.03512.16
5.3.60.0030.02312.13
5.3.50.0020.02312.22
5.3.40.0060.02112.18
5.3.30.0090.03512.19
5.3.20.0080.03611.99
5.3.10.0020.04412.06
5.3.00.0090.02312.04
5.2.170.0030.03610.78
5.2.160.0070.02210.73
5.2.150.0020.03710.82
5.2.140.0090.02810.81
5.2.130.0060.02910.83
5.2.120.0080.01810.78
5.2.110.0030.02210.79
5.2.100.0080.03110.73
5.2.90.0080.02210.78
5.2.80.0040.03410.76
5.2.70.0030.03610.83
5.2.60.0040.02710.84
5.2.50.0060.03110.74
5.2.40.0020.02110.69
5.2.30.0050.03310.65
5.2.20.0040.03310.63
5.2.10.0020.03410.65
5.2.00.0050.03010.60
5.1.60.0030.02710.24
5.1.50.0070.01910.31
5.1.40.0070.02110.21
5.1.30.0050.01510.42
5.1.20.0060.01610.37
5.1.10.0060.01810.27
5.1.00.0050.02210.22
5.0.50.0080.0229.52
5.0.40.0040.0179.52
5.0.30.0040.0319.52
5.0.20.0060.0219.52
5.0.10.0000.0289.52
5.0.00.0030.0349.52
4.4.90.0030.0189.52
4.4.80.0030.0199.52
4.4.70.0000.0189.52
4.4.60.0020.0169.52
4.4.50.0020.0169.52
4.4.40.0010.0159.52
4.4.30.0050.0079.52
4.4.20.0080.0129.52
4.4.10.0020.0209.52
4.4.00.0030.0289.52
4.3.110.0090.0059.52
4.3.100.0050.0179.52
4.3.90.0020.0159.52
4.3.80.0020.0229.52
4.3.70.0020.0209.52
4.3.60.0000.0149.52
4.3.50.0020.0219.52
4.3.40.0030.0139.52
4.3.30.0000.0159.52
4.3.20.0050.0159.52
4.3.10.0030.0209.52
4.3.00.0030.0179.52

preferences:
45.09 ms | 401 KiB | 5 Q