3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = 'foo bar baz <img src="http://ak-hdl.buzzfed.com/static/2014-06/6/12/enhanced/webdr08/enhanced-21313-1402070821-11.jpg" width="500" height="1000"/> dragons and ponies.'; for ( $i = 0; $i < 1000; $i++ ) { if ( preg_match_all( '#<(?P<tag>img)[^<]*?(?:>[\s\S]*?<\/(?P=tag)>|\s*\/>)#', $content, $matches ) ) { foreach ( $matches[0] as $match ) { preg_match( '/ src="([^"]+)"/', $content, $src ); preg_match( '/ width="([0-9]+)"/', $content, $width ); preg_match( '/ height="([0-9]+)"/', $content, $height ); } } }

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.4.120.0100.00920.82
8.4.110.0130.01018.80
8.4.100.0120.01017.87
8.4.90.0120.01017.86
8.4.80.0040.00519.14
8.4.70.0120.01118.04
8.4.60.0070.00320.65
8.4.50.0110.01218.68
8.4.40.0120.01020.43
8.4.30.0140.00717.82
8.4.20.0110.01117.87
8.4.10.0060.00317.84
8.3.250.0140.00718.88
8.3.240.0060.00416.62
8.3.230.0130.00816.86
8.3.220.0100.00916.67
8.3.210.0080.01216.52
8.3.200.0140.00816.71
8.3.190.0060.00419.02
8.3.180.0150.00616.69
8.3.170.0070.01320.83
8.3.160.0070.01317.31
8.3.150.0100.00617.29
8.3.140.0140.00716.45
8.3.130.0100.01316.73
8.3.120.0100.00020.66
8.3.110.0100.01020.94
8.3.100.0030.00716.61
8.3.90.0100.01026.77
8.3.80.0070.00717.97
8.3.70.0150.00916.62
8.3.60.0100.01016.63
8.3.50.0150.00621.99
8.3.40.0130.00418.96
8.3.30.0060.00918.96
8.3.20.0040.00420.29
8.3.10.0040.00423.64
8.3.00.0060.00319.27
8.2.290.0040.00720.50
8.2.280.0110.01020.47
8.2.270.0130.00617.53
8.2.260.0080.01318.41
8.2.250.0030.00916.79
8.2.240.0030.00717.08
8.2.230.0100.00022.58
8.2.220.0000.01037.54
8.2.210.0110.01126.77
8.2.200.0070.00318.54
8.2.190.0070.01116.88
8.2.180.0070.01016.75
8.2.170.0130.00322.96
8.2.160.0060.01220.35
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0060.00326.16
8.2.120.0030.00719.70
8.2.110.0000.01121.25
8.2.100.0100.00319.82
8.2.90.0090.00017.88
8.2.80.0030.00619.03
8.2.70.0000.01017.75
8.2.60.0120.00517.69
8.2.50.0100.00617.63
8.2.40.0060.01017.75
8.2.30.0110.00317.77
8.2.20.0110.00517.71
8.2.10.0090.00717.71
8.2.00.0070.00717.60
8.1.330.0090.01116.90
8.1.320.0110.01116.20
8.1.310.0140.00718.45
8.1.300.0130.00718.56
8.1.290.0070.00730.84
8.1.280.0030.01325.92
8.1.270.0000.00923.71
8.1.260.0000.00826.35
8.1.250.0090.00028.09
8.1.240.0040.00822.74
8.1.230.0090.00322.75
8.1.220.0030.00618.81
8.1.210.0040.00718.77
8.1.200.0000.01117.35
8.1.190.0100.00617.18
8.1.180.0090.00617.60
8.1.170.0070.00817.42
8.1.160.0080.00818.08
8.1.150.0090.00618.04
8.1.140.0080.00518.43
8.1.130.0090.00617.45
8.1.120.0050.00917.45
8.1.110.0090.00617.38
8.1.100.0120.00517.53
8.1.90.0100.00317.53
8.1.80.0090.00517.38
8.1.70.0050.00817.53
8.1.60.0060.00817.67
8.1.50.0090.00817.60
8.1.40.0100.00817.59
8.1.30.0090.00617.73
8.1.20.0060.01017.54
8.1.10.0090.00617.49
8.1.00.0090.00617.53
8.0.300.0070.00318.77
8.0.290.0090.00017.00
8.0.280.0040.01017.32
8.0.270.0080.00617.29
8.0.260.0080.00616.98
8.0.250.0080.00516.83
8.0.240.0090.00516.97
8.0.230.0090.00616.95
8.0.220.0080.00616.83
8.0.210.0090.00516.83
8.0.200.0070.00516.85
8.0.190.0080.00716.95
8.0.180.0100.00616.85
8.0.170.0070.00816.94
8.0.160.0100.00416.92
8.0.150.0100.00616.90
8.0.140.0110.00516.81
8.0.130.0100.00715.69
8.0.120.0110.00516.84
8.0.110.0100.00616.90
8.0.100.0080.00516.86
8.0.90.0070.00716.86
8.0.80.0090.00916.87
8.0.70.0080.00716.84
8.0.60.0070.00516.98
8.0.50.0080.00516.85
8.0.30.0110.00817.07
8.0.20.0120.00817.17
8.0.10.0120.00516.91
8.0.00.0120.00816.97
7.4.330.0100.00116.60
7.4.320.0060.00816.70
7.4.300.0080.00716.65
7.4.290.0100.00516.69
7.4.280.0140.00316.68
7.4.270.0040.01116.69
7.4.260.0110.00416.67
7.4.250.0050.00615.40
7.4.240.0050.00816.71
7.4.230.0070.00716.65
7.4.220.0110.00916.80
7.4.210.0090.00816.67
7.4.200.0040.00916.77
7.4.190.0100.00716.65
7.4.180.0110.00416.65
7.4.160.0080.01016.63
7.4.150.0080.00916.89
7.4.140.0120.00817.23
7.4.130.0100.01316.61
7.4.120.0090.01116.62
7.4.110.0100.01116.59
7.4.100.0100.01116.64
7.4.90.0120.00916.66
7.4.80.0120.00917.29
7.4.70.0070.01116.68
7.4.60.0130.00816.73
7.4.50.0080.01116.55
7.4.40.0070.01216.62
7.4.30.0140.00516.58
7.4.20.0110.00916.56
7.4.10.0110.00716.57
7.4.00.0070.01316.04
7.3.330.0090.00515.45
7.3.320.0090.00515.43
7.3.310.0130.00116.52
7.3.300.0090.00616.42
7.3.290.0100.00416.46
7.3.280.0140.00516.45
7.3.270.0100.00916.72
7.3.260.0100.00816.43
7.3.250.0130.00816.55
7.3.240.0100.01116.50
7.3.230.0130.00816.57
7.3.220.0110.00816.50
7.3.210.0090.01316.46
7.3.200.0120.01116.54
7.3.190.0090.01016.47
7.3.180.0100.00916.45
7.3.170.0100.00916.61
7.3.160.0110.00916.50
7.3.150.0130.00616.57
7.3.140.0120.00716.53
7.3.130.0110.00816.47
7.3.120.0110.00716.10
7.3.110.0100.00916.26
7.3.100.0100.01016.07
7.3.90.0090.01016.19
7.3.80.0160.01116.16
7.3.70.0090.00816.19
7.3.60.0110.00716.22
7.3.50.0090.01115.99
7.3.40.0110.00815.90
7.3.30.0090.01015.76
7.3.20.0270.00816.96
7.3.10.0350.00616.86
7.3.00.0300.01016.92
7.2.340.0160.01016.71
7.2.330.0160.00916.73
7.2.320.0160.01216.63
7.2.310.0160.00916.73
7.2.300.0110.01216.68
7.2.290.0130.01016.65
7.2.280.0190.01016.62
7.2.270.0150.00916.63
7.2.260.0160.01216.67
7.2.250.0140.01016.29
7.2.240.0150.00916.30
7.2.230.0100.01116.58
7.2.220.0120.01016.22
7.2.210.0120.01216.26
7.2.200.0120.01216.32
7.2.190.0140.00916.40
7.2.180.0120.01116.14
7.2.170.0130.01016.08
7.2.160.0140.00816.06
7.2.150.0350.01217.14
7.2.140.0440.00816.82
7.2.130.0340.01017.23
7.2.120.0490.01016.82
7.2.110.0130.00917.28
7.2.100.0310.00817.16
7.2.90.0180.01017.22
7.2.80.0180.00917.24
7.2.70.0400.00817.25
7.2.60.0180.01017.10
7.2.50.0370.00917.18
7.2.40.0290.01317.23
7.2.30.0360.01117.25
7.2.20.0360.01016.89
7.2.10.0320.01017.19
7.2.00.0250.01117.58
7.1.330.0100.01116.59
7.1.320.0150.00716.69
7.1.310.0120.00816.70
7.1.300.0120.00916.51
7.1.290.0160.01016.63
7.1.280.0110.00916.48
7.1.270.0330.01015.98
7.1.260.0290.00915.98
7.1.250.0370.00716.03
7.1.240.0380.00615.99
7.1.230.0230.00815.66
7.1.220.0430.00716.10
7.1.210.0110.01316.11
7.1.200.0150.00816.00
7.1.190.0190.00916.01
7.1.180.0150.00816.12
7.1.170.0420.01316.00
7.1.160.0150.01216.01
7.1.150.0170.01016.06
7.1.140.0300.01115.93
7.1.130.0470.00916.07
7.1.120.0320.01015.98
7.1.110.0330.00516.13
7.1.100.0420.00816.16
7.1.90.0350.00916.07
7.1.80.0350.00916.03
7.1.70.0250.00815.91
7.1.60.0350.00816.35
7.1.50.0120.01016.29
7.1.40.0100.01016.23
7.1.30.0260.00816.22
7.1.20.0130.01116.13
7.1.10.0460.00716.17
7.1.00.0180.01216.22
7.0.330.0440.01215.67
7.0.320.0160.01115.69
7.0.310.0140.01215.76
7.0.300.0400.01115.78
7.0.290.0160.00715.72
7.0.280.0150.01015.32
7.0.270.0330.01215.62
7.0.260.0360.00815.72
7.0.250.0390.00515.73
7.0.240.0310.00915.64
7.0.230.0310.01015.91
7.0.220.0350.01015.28
7.0.210.0230.00715.68
7.0.200.0100.00915.89
7.0.190.0140.01115.95
7.0.180.0230.01015.89
7.0.170.0160.01015.85
7.0.160.0140.01015.75
7.0.150.0190.01015.77
7.0.140.0240.00815.78
7.0.130.0220.00815.99
7.0.120.0200.01015.90
7.0.110.0210.00815.79
7.0.100.0120.00915.87
7.0.90.0200.00915.89
7.0.80.0230.00915.74
7.0.70.0220.00915.87
7.0.60.0210.00915.85
7.0.50.0210.00915.83
7.0.40.0240.00815.50
7.0.30.0250.00815.63
7.0.20.0230.00615.44
7.0.10.0300.01215.55
7.0.00.0240.00915.43
5.6.400.0100.01815.39
5.6.390.0110.01615.47
5.6.380.0110.01615.60
5.6.370.0120.02115.47
5.6.360.0150.01915.58
5.6.350.0130.01515.57
5.6.340.0170.01715.51
5.6.330.0120.02315.52
5.6.320.0140.01615.56
5.6.310.0120.01515.42
5.6.300.0090.02716.27
5.6.290.0090.03016.33
5.6.280.0080.02516.30
5.6.270.0080.02616.31
5.6.260.0100.02416.41
5.6.250.0120.02216.31
5.6.240.0160.02616.35
5.6.230.0100.02516.38
5.6.220.0100.02416.40
5.6.210.0090.02816.38
5.6.200.0130.02516.42
5.6.190.0090.02716.31
5.6.180.0110.02416.33
5.6.170.0100.02416.32
5.6.160.0110.02516.36
5.6.150.0100.02616.37
5.6.140.0080.02616.39
5.6.130.0090.02416.33
5.6.120.0090.02716.43
5.6.110.0100.02416.33
5.6.100.0100.02716.38
5.6.90.0100.02316.29
5.6.80.0100.02116.19
5.6.70.0120.02316.22
5.6.60.0100.02416.20
5.6.50.0100.02616.17
5.6.40.0090.01916.21
5.6.30.0090.02416.12
5.6.20.0080.02116.21
5.6.10.0100.02216.21
5.6.00.0100.02116.18
5.5.380.0110.02415.86
5.5.370.0150.02315.73
5.5.360.0120.02415.75
5.5.350.0100.02515.78
5.5.340.0130.02115.84
5.5.330.0130.01915.84
5.5.320.0130.02015.89
5.5.310.0150.02315.86
5.5.300.0140.02515.81
5.5.290.0110.02315.88
5.5.280.0160.02415.78
5.5.270.0130.02115.94
5.5.260.0130.02615.84
5.5.250.0120.02415.81
5.5.240.0060.03015.74
5.5.230.0120.02215.71
5.5.220.0100.02715.64
5.5.210.0080.02415.66
5.5.200.0090.02415.67
5.5.190.0120.02115.57
5.5.180.0100.02315.66
5.5.170.0060.02315.36
5.5.160.0090.02115.71
5.5.150.0080.02315.66
5.5.140.0110.02215.74
5.5.130.0090.02515.75
5.5.120.0120.02015.68
5.5.110.0100.02215.69
5.5.100.0120.02115.62
5.5.90.0080.02415.63
5.5.80.0090.02615.65
5.5.70.0120.02515.67
5.5.60.0130.01915.71
5.5.50.0110.02215.69
5.5.40.0100.02315.64
5.5.30.0130.02115.65
5.5.20.0120.02215.61
5.5.10.0120.02315.66
5.5.00.0100.02315.69
5.4.450.0080.01216.52
5.4.440.0090.00916.52
5.4.430.0060.01116.52
5.4.420.0110.00716.52
5.4.410.0000.01716.52
5.4.400.0100.00716.52
5.4.390.0040.01316.52
5.4.380.0080.01016.52
5.4.370.0090.00916.52
5.4.360.0050.01316.52
5.4.350.0100.00716.52
5.4.340.0090.00916.52
5.4.330.0090.00916.52
5.4.320.0090.00916.52
5.4.310.0050.01416.52
5.4.300.0070.01116.52
5.4.290.0040.01516.52
5.4.280.0050.01416.52
5.4.270.0120.00616.52
5.4.260.0090.00916.52
5.4.250.0080.00816.52
5.4.240.0110.00716.52
5.4.230.0070.01016.52
5.4.220.0090.00916.52
5.4.210.0060.01216.52
5.4.200.0100.01016.52
5.4.190.0120.00616.52
5.4.180.0040.01316.52
5.4.170.0070.01016.52
5.4.160.0070.01016.52
5.4.150.0090.00916.52
5.4.140.0080.01116.52
5.4.130.0070.01116.52
5.4.120.0090.00916.52
5.4.110.0080.00816.52
5.4.100.0070.01116.52
5.4.90.0080.00816.52
5.4.80.0100.00716.52
5.4.70.0100.00716.52
5.4.60.0040.01316.52
5.4.50.0040.01316.52
5.4.40.0110.00616.52
5.4.30.0030.01416.52
5.4.20.0100.00716.52
5.4.10.0070.01016.52
5.4.00.0040.01316.52
5.3.290.0080.00816.52
5.3.280.0040.01216.52
5.3.270.0000.01716.52
5.3.260.0110.00816.52
5.3.250.0040.01416.52
5.3.240.0110.00716.52
5.3.230.0040.01416.52
5.3.220.0000.01916.52
5.3.210.0070.01316.52
5.3.200.0050.01416.52
5.3.190.0040.01416.52
5.3.180.0090.00916.52
5.3.170.0120.00516.52
5.3.160.0040.01416.52
5.3.150.0090.00916.52
5.3.140.0070.01116.52
5.3.130.0060.01316.52
5.3.120.0070.01116.52
5.3.110.0080.01116.52
5.3.100.0080.01116.52
5.3.90.0000.01616.52
5.3.80.0090.00916.52
5.3.70.0110.00716.52
5.3.60.0070.01016.52
5.3.50.0120.00416.52
5.3.40.0040.01316.52
5.3.30.0080.00816.52
5.3.20.0070.01016.52
5.3.10.0060.01016.52
5.3.00.0100.00616.52
5.2.170.0030.01316.52
5.2.160.0040.01216.52
5.2.150.0040.01116.52
5.2.140.0030.01216.52
5.2.130.0000.01516.52
5.2.120.0060.00916.52
5.2.110.0090.00616.52
5.2.100.0090.00616.52
5.2.90.0040.01116.52
5.2.80.0060.01116.52
5.2.70.0030.01216.52
5.2.60.0070.00716.52
5.2.50.0000.01516.52
5.2.40.0040.01116.52
5.2.30.0080.00816.52
5.2.20.0050.01016.52
5.2.10.0060.01016.52
5.2.00.0040.01216.52
5.1.60.0000.01616.52
5.1.50.0040.01116.52
5.1.40.0000.01416.52
5.1.30.0000.01516.52
5.1.20.0030.01216.52
5.1.10.0050.01116.52
5.1.00.0040.01116.52
5.0.50.0080.00616.52
5.0.40.0000.01416.52
5.0.30.0000.01416.52
5.0.20.0030.01016.52
5.0.10.0050.00916.52
5.0.00.0050.00816.52
4.4.90.0040.00716.52
4.4.80.0060.00416.52
4.4.70.0000.01116.52
4.4.60.0030.00816.52
4.4.50.0030.00916.52
4.4.40.0030.00916.52
4.4.30.0040.00816.52
4.4.20.0000.01216.52
4.4.10.0000.01116.52
4.4.00.0040.00716.52
4.3.110.0060.00416.52
4.3.100.0000.01216.52
4.3.90.0030.00816.52
4.3.80.0000.01216.52
4.3.70.0060.00616.52
4.3.60.0030.00916.52
4.3.50.0040.00816.52
4.3.40.0030.00916.52
4.3.30.0000.01016.52
4.3.20.0000.01016.52
4.3.10.0030.00616.52
4.3.00.0050.00516.52

preferences:
78.64 ms | 403 KiB | 5 Q