When I first came across this tree, I thought it was a berries tree or some kind. With help from LK, I got its id.

Hura crepitans, with many common names such as monkey's dinner-bell, sand-box tree, possum wood, dynamite tree, etc. It is recognized by the many dark, pointed spines and smooth brown bark. These spines have caused it to be called Monkey no-climb too.

The berries look-alike structure is actually their male flowers that have no petals. Male flowers grow on long spikes; female flowers are solitary.

I took the above photo during my trip to Langkawi last December, it have a crab spider on it.

The fruit with a shape of pumpkin.

When ripe, pods catapult the seeds as far as 100 meters and is considered an invasive species in some country as their seeds can germinate and grow in deep shade, allowing the plant to invade undisturbed forest. The explosive sound of the ripe fruit as it splits into segments thus won them the name of Dynamite tree. This pumpkins shape fruit was once used for holding fine dry sand used for blotting ink before the introduction of blotting paper, hence the common name "sand box tree.”
The irritant latex is used as a barbasco and arrow poison, and is said to cause ailing teeth to fallout. the latex is used to treat skin diseases, rheumatism, and intestinal worms and was formerly used in the United states to prepare tear gas. The poisonous seeds, eaten by macaws, are used as a purgative in Costa Rica. they are used to poison noxious animals. The dry leaves are eaten by cattle during the dry season. A bark extract is used for leprosy. The wood is used locally in light construction, and for dugouts. Burning wood repels insects. (source from
Webster)

I'm seeing this tree is getting popular perhaps due to the shade that the tree provides.